/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Great+Vibes&family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* HSL Color System matching the Dolce Vita demo precisely */
  --background: 40 40% 96%;
  /* Ivory / Warm Cream */
  --foreground: 218 45% 22%;
  /* Navy blue text */
  --card: 46 70% 94%;
  /* Rich Cream card background */
  --card-foreground: 218 45% 20%;
  --primary: 212 50% 42%;
  /* Deep Navy Accent */
  --secondary: 46 75% 78%;
  /* Soft Gold Accent */
  --border: 218 30% 85%;
  --input: 218 30% 88%;
  --radius: 1rem;

  /* Sicilian Theme Palette Colors */
  --navy: #1D4375;
  --navy-light: #2A5A9E;
  --gold: #D3AA52;
  --gold-soft: #F7EFE2;
  --terracotta: #C2593F;
  --olive: #4A6B46;
  --cream-paper: #FAF6EE;
  --text-dark: #1C2D52;
  --text-light: #526388;

  /* Font Families matching the types used in the live template */
  --font-display: 'Cinzel', 'Georgia', serif;
  --font-script: 'Great Vibes', 'Playfair Display', cursive;
  --font-body: 'Montserrat', 'Helvetica Neue', sans-serif;

  /* Shadow & Transitions */
  --shadow-soft: 0 4px 20px rgba(28, 45, 82, 0.05);
  --shadow-elegant: 0 10px 30px rgba(28, 45, 82, 0.08), 0 25px 60px rgba(28, 45, 82, 0.15);
  --transition-smooth: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Core Styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Times New Roman", Times, serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;

  /* Noise Grain Texture Overlay matching the demo exactly */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-blend-mode: overlay;
  background-size: 180px;
  background-attachment: fixed;
}

/* Watermark backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 0 L120 60 L60 120 L0 60 Z' fill='none' stroke='%231D4375' stroke-width='1.5'/%3E%3Ccircle cx='60' cy='60' r='14' fill='%231D4375'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}

/* FIXED CONTROLS */
.fixed-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  display: none;
  gap: 10px;
  z-index: 2000;
}

body.invitation-open .fixed-controls {
  display: flex;
}

.control-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(250, 246, 238, 0.9);
  border: 1px solid rgba(29, 67, 117, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  color: var(--navy);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.control-btn:hover {
  transform: scale(1.06);
  background-color: #fff;
  border-color: var(--navy);
  color: var(--terracotta);
}

.control-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* 3D ENVELOPE STAGE (Only visible on start screen) */
.envelope-stage {
  width: 100cqi;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
  position: fixed;
  inset: 0;
  z-index: 100;
  transition: opacity 0.8s ease, visibility 0.8s;
  padding: 0;
  background: #f5ead6;
  overflow: hidden;
}

body.envelope-opening .envelope-stage {
  background: #f5ead6;
}

body.envelope-opening .envelope-wrapper {
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.9s ease 0.35s, transform 0.9s ease 0.35s;
}

.envelope-stage.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Horizontal Envelope Container */
.envelope-wrapper {
  position: relative;
  width: min(100%, 62.4vh);
  height: auto;
  max-width: none;
  aspect-ratio: 742 / 1189;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
  filter: none;
  cursor: pointer;
  z-index: 2;
}

.home-transition {
  display: none;
}

.home-transition img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  user-select: none;
  opacity: 0;
  transition: opacity 1.85s ease 0.2s;
}

.home-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 31%;
  transform: translateY(25px);
  opacity: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 0 8cqi;
  box-sizing: border-box;
  font-family: var(--font-script);
  color: #1d4375;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.75);
  pointer-events: none;
  transition: opacity 1.8s ease 0.8s, transform 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.8s;
}

.invite-container.is-active .home-title {
  opacity: 1;
  transform: translateY(0);
}

.home-title span {
  display: block;
  width: 100%;
  font-size: clamp(3.4rem, 11cqi, 6.4rem);
  line-height: 0.88;
  font-weight: 400;
}

.home-title-amp {
  margin: 0.08em 0 0.02em;
  font-size: clamp(2.4rem, 8cqi, 4.4rem) !important;
}

.home-title small {
  display: block;
  width: 100%;
  margin-top: 1.1rem;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.1rem, 4cqi, 1.45rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #1d4375;
}

.home-title small em {
  font-style: italic;
}

body.envelope-opening .home-transition {
  opacity: 1;
}

body.envelope-opening .home-transition img {
  opacity: 1;
}

.envelope {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  background: transparent;
  border-radius: 0;
  border: 0;
  overflow: hidden;
}

.envelope-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  user-select: none;
  transition: opacity 1.7s ease, transform 2s ease;
}

.envelope-wrapper.is-open .envelope-image {
  opacity: 1;
  transform: none;
}

.envelope-emboss {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 13%;
  height: 50%;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
}

.envelope-emboss svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.envelope-emboss path {
  fill: none;
  stroke: rgba(96, 72, 35, 0.45);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(2px 2px 1px rgba(255, 255, 255, 0.55)) drop-shadow(-1px -1px 1px rgba(93, 66, 30, 0.28));
}

.envelope-date {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5.5%;
  z-index: 0;
  text-align: center;
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 8cqi, 4.4rem);
  color: rgba(102, 74, 36, 0.34);
  letter-spacing: 0.04em;
  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.42), -1px -1px 1px rgba(92, 63, 27, 0.18);
  pointer-events: none;
  display: none;
}

/* Inner Lining (Ceramic pattern) */
.envelope-back {
  position: absolute;
  inset: 0;
  background-color: var(--cream-paper);
  border-radius: 8px;
  overflow: hidden;
  z-index: 0;
  display: none;
}

.envelope-liner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 85%;
  opacity: 0.9;
}

/* Horizontal Envelope Flap (3D flip) */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 52%;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  display: none;
}

.envelope-wrapper.is-open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 0;
  /* Fall behind so card can slide in front */
}

.flap-front,
.flap-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  width: 100%;
  height: 100%;
}

.flap-front {
  transform: rotateX(0deg);
}

.flap-back {
  transform: rotateX(180deg);
}

.flap-svg {
  width: 100%;
  height: 100%;
}

.flap-bg-front {
  fill: var(--cream-paper);
  stroke: rgba(44, 51, 48, 0.08);
  stroke-width: 0.75;
}

.flap-bg-back {
  fill: var(--cream-paper);
  stroke: rgba(44, 51, 48, 0.1);
  stroke-width: 0.75;
}

/* Envelope Front Pocket */
.envelope-front {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: none;
}

.envelope-pocket-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 -4px 10px rgba(28, 45, 82, 0.04));
}

.envelope-pocket-bg {
  fill: var(--cream-paper);
  stroke: rgba(44, 51, 48, 0.08);
  stroke-width: 0.75;
}

/* Wax Seal Button */
.wax-seal {
  position: absolute;
  inset: 0;
  transform: none;
  width: 100%;
  height: 100%;
  background: transparent;
  border-radius: 0;
  border: 0;
  z-index: 8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.wax-seal::after {
  display: none;
}

.wax-seal-monogram {
  display: none;
}

.wax-seal:hover {
  transform: none;
  box-shadow: none;
}

.envelope-wrapper.is-open .wax-seal {
  opacity: 0;
  transform: none;
  pointer-events: none;
}

/* Helper details below envelope */
.helper-text {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 20%;
  z-index: 9;
  margin-top: 0;
  text-align: center;
  color: rgba(105, 86, 68, 0.58);
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 2.4cqi, 0.94rem);
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  animation: pulse-helper 2s infinite;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: opacity 0.4s;
}

.helper-arrow {
  width: 14px;
  height: 14px;
  fill: currentColor;
  animation: bounce-arrow 1s infinite alternate;
}

.envelope-wrapper.is-open~.helper-text {
  opacity: 0;
  pointer-events: none;
}

/* Letter Preview slide-up */
.letter-preview {
  position: absolute;
  top: 10%;
  left: 6%;
  width: 88%;
  height: 80%;
  background-color: #fff;
  border: 1px solid rgba(44, 51, 48, 0.08);
  border-radius: 6px;
  z-index: 0;
  transform: translateY(0);
  transition: transform 1.1s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  display: none;
}

.letter-preview-border {
  border: 1px solid rgba(29, 67, 117, 0.15);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.letter-preview-monogram {
  font-family: var(--font-script);
  font-size: 2.8rem;
  color: var(--terracotta);
  line-height: 1;
}

.letter-preview-names {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--navy);
  margin-top: 6px;
  text-transform: uppercase;
}

.envelope-wrapper.is-open .letter-preview {
  transform: translateY(-70%);
}


/* FULL PAGE SCROLLABLE INVITATION (Reveals after opening) */
.invite-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease 0.3s, visibility 0.9s;
  padding-bottom: 0;
  z-index: 10;
  position: relative;
}

body.envelope-opening .invite-container {
  transition: none;
}

.invite-container.is-active {
  opacity: 1;
  visibility: visible;
}

.home-screen,
.image-screen {
  width: 100%;
  aspect-ratio: 375 / 667;
  max-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #f5ead6;
  line-height: 0;
}

.image-screen {
  margin-top: -1px;
}

.home-screen img,
.image-screen img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  user-select: none;
}

.image-screen img {
  height: calc(100% + 12px);
  transform: translateY(-12px);
}

.church-screen img {
  height: calc(100% + 28px);
  transform: translateY(-28px);
}

.reception-screen {
  margin-top: -1px;
}

.reception-screen img {
  height: calc(100% + 14px);
  transform: translateY(-14px);
}

.transport-screen {
  margin-top: -30px;
}

.transport-screen img {
  height: calc(100% + 70px);
  transform: translateY(-70px);
}

.gift-screen {
  margin-top: -5px;
  max-height: 100%;
}

.gift-screen img {
  height: calc(100% + 45px);
  transform: translateY(-45px);
}

.gift-message {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 27%;
  z-index: 2;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.1rem, 4cqi, 1.7rem);
  line-height: 1.25;
  font-weight: 400;
  color: #1d4375;
}

.rsvp-message {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 10%;
  z-index: 2;
  text-align: center;
  color: #1d4375;
}

.gift-message strong {
  font-weight: 600;
}

.rsvp-title {
  display: inline-block;
  font-family: var(--font-script);
  font-size: clamp(3.2rem, 11cqi, 5rem);
  color: #2a5a9e;
  line-height: 1;
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: 400;
}

.rsvp-text {
  display: block;
  font-size: clamp(0.95rem, 3.2cqi, 1.35rem);
  margin-top: 12px;
  white-space: nowrap;
}

.transport-message {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 2%;
  z-index: 2;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.18rem, 4.4cqi, 1.9rem);
  line-height: 1.15;
  font-weight: 400;
  color: #1d4375;
  pointer-events: none;
}

.reception-details {
  position: absolute;
  left: 0;
  right: 0;
  top: 13%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #1d4375;
  pointer-events: none;
  padding: 0 12%;
}

.reception-details strong {
  font-family: var(--font-display);
  font-size: clamp(0.68rem, 2cqi, 0.86rem);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #1d4375;
  white-space: nowrap;
}

.reception-details p {
  margin-top: 0.85rem;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.75rem, 6cqi, 2.55rem);
  line-height: 1;
  font-weight: 400;
  color: #1d4375;
}

.reception-address {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 27%;
  z-index: 2;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.05rem, 3.4cqi, 1.35rem);
  font-style: normal;
  line-height: 1.35;
  color: #1d4375;
  pointer-events: none;
}

.church-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 4.5%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
  color: #1d4375;
}

.church-title small {
  font-family: var(--font-display);
  font-size: clamp(0.64rem, 2.1cqi, 0.86rem);
  font-weight: 500;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: #1d4375;
}

.church-title span {
  margin-top: 1.35rem;
  font-family: var(--font-script);
  font-size: clamp(3.2rem, 12cqi, 6rem);
  line-height: 0.9;
  color: #2a5a9e;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.68);
}

.church-title::after {
  content: "";
  width: 72px;
  height: 1px;
  margin-top: 1.2rem;
  background: rgba(42, 90, 158, 0.24);
}

.church-details {
  position: absolute;
  left: 0;
  right: 0;
  top: 35%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #1d4375;
  pointer-events: none;
}

.church-details strong {
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 2cqi, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: #1d4375;
}

.church-details p {
  margin-top: 0.45rem;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.18rem, 4.4cqi, 1.9rem);
  line-height: 1.05;
  font-weight: 400;
  color: #1d4375;
}

.church-details time {
  margin-top: 0.55rem;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.05rem, 3.2cqi, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #1d4375;
}

.church-address {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 11%;
  z-index: 2;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.05rem, 3.4cqi, 1.35rem);
  font-style: normal;
  line-height: 1.35;
  color: #1d4375;
  pointer-events: none;
  white-space: nowrap;
}

.maps-link {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6.5%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: fit-content;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 2.5cqi, 0.92rem);
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1d4375;
}

.maps-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.reception-screen .reception-maps-link {
  bottom: 22.5%;
}

/* Main column wrapper */
.invite-scroller {
  width: 100%;
  max-width: 480px;
  padding: 80px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 60px;
  /* Generous gap between sections */
}

/* SECTION STRUCTURE */
.invite-section {
  width: 100%;
  background-color: hsl(var(--card) / 0.7);
  border-radius: var(--radius);
  border: 1px solid rgba(29, 67, 117, 0.08);
  padding: 40px 24px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.invite-section:hover {
  box-shadow: var(--shadow-elegant);
  transform: translateY(-2px);
}

/* Section Header ornaments */
.section-ornament-top {
  width: 80px;
  height: 40px;
  margin: 0 auto 15px;
  display: block;
}

.section-eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--navy);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--terracotta);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 25px;
}

/* --- SECTION 1: HERO COVER --- */
.hero-section {
  padding-top: 50px;
  overflow: hidden;
}

/* Classic Italian Architectural Photo Arch */
.photo-arch-container {
  width: 220px;
  height: 310px;
  margin: 20px auto 30px;
  position: relative;
  filter: drop-shadow(0 10px 20px rgba(28, 45, 82, 0.12));
}

.photo-arch {
  width: 100%;
  height: 100%;
  border-radius: 110px 110px 0 0;
  /* Archway shape */
  border: 4px solid #fff;
  overflow: hidden;
  position: relative;
}

.photo-arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Double gold thin line around the arch */
.photo-arch-container::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 116px 116px 0 0;
  border: 1px solid var(--gold);
  pointer-events: none;
  opacity: 0.75;
}

.hero-names {
  font-family: var(--font-script);
  font-size: clamp(3.8rem, 16cqi, 4.8rem);
  color: var(--terracotta-dark);
  line-height: 0.85;
  margin: 15px 0;
  text-shadow: 1px 1px 1px #fff;
}

.hero-names span {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--olive);
  margin: 6px 0;
}

.hero-announcement {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-light);
  max-width: 32ch;
  margin: 0 auto;
}

/* Countdown Timer Styling */
.countdown-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 35px;
}

.countdown-block {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(29, 67, 117, 0.15);
  background-color: rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

.countdown-number {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}

.countdown-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
}


/* --- SECTION 2: DOVE & QUANDO (LOCATION DETAILS) --- */
.location-section {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.location-card {
  border: 1.5px solid rgba(29, 67, 117, 0.1);
  border-radius: 12px;
  padding: 30px 20px;
  background-color: rgba(255, 255, 255, 0.4);
  position: relative;
}

.location-card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(194, 89, 63, 0.2);
  border-radius: 8px;
  pointer-events: none;
}

.location-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}

.location-time {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: 10px;
}

.location-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.location-address {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 20px;
}


/* --- SECTION 3: PROGRAMMA (TIMELINE) --- */
.timeline-list {
  position: relative;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 35px;
  max-width: 320px;
  margin: 0 auto;
}

/* Vertical line */
.timeline-list::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 20px;
  width: 1px;
  background-color: var(--gold);
  opacity: 0.5;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  text-align: left;
  position: relative;
}

.timeline-bullet {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #fff;
  border: 1.5px solid var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  flex-shrink: 0;
  color: var(--navy);
  box-shadow: var(--shadow-soft);
}

.timeline-bullet svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.timeline-time {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 4px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.4;
}


/* --- SECTION 4: INFO UTILI (ACCOMMODATION & REGISTRY) --- */
.info-accordion {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-item {
  border-bottom: 1px solid rgba(29, 67, 117, 0.1);
  padding-bottom: 20px;
}

.info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-header {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.info-header svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.info-text {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 38ch;
  margin: 0 auto;
}

.iban-code {
  font-family: monospace;
  font-size: 0.85rem;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px dashed rgba(29, 67, 117, 0.2);
  margin-top: 10px;
  display: inline-block;
  letter-spacing: 0.5px;
  color: var(--text-dark);
}


/* --- SECTION 5: GALLERY CAROUSEL --- */
.gallery-viewport {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(29, 67, 117, 0.1);
  box-shadow: var(--shadow-soft);
}

.gallery-container {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-slide {
  width: 33.333%;
  height: 100%;
  position: relative;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(28, 45, 82, 0.75));
  color: #fff;
  padding: 18px;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  font-weight: 500;
  font-family: var(--font-display);
}

.gallery-nav {
  display: flex;
  justify-content: space-between;
  width: 100%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 10px;
  pointer-events: none;
}

.gallery-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: var(--shadow-soft);
  color: var(--navy);
  transition: var(--transition-smooth);
}

.gallery-arrow:hover {
  background-color: #fff;
  color: var(--terracotta);
}

.gallery-arrow svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--border);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.gallery-dot.is-active {
  background-color: var(--navy);
  transform: scale(1.3);
}


/* --- SECTION 6: RSVP FORM --- */
.rsvp-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  color: var(--navy);
  text-transform: uppercase;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(29, 67, 117, 0.15);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--navy);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(29, 67, 117, 0.08);
}

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 5px 0;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(29, 67, 117, 0.15);
  font-size: 0.72rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-light);
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
  text-transform: uppercase;
}

.radio-option input[type="radio"]:checked+.radio-label {
  background-color: rgba(29, 67, 117, 0.08);
  border-color: var(--navy);
  color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
}

/* Success layout */
.rsvp-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 20px 0;
  animation: scaleIn 0.5s ease forwards;
}

.success-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: rgba(74, 107, 70, 0.1);
  color: var(--olive);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--olive);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.success-msg {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-light);
  max-width: 28ch;
  text-align: center;
}


/* BUTTON STYLING */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  cursor: pointer;
  width: 100%;
}

.btn-primary {
  background-color: var(--terracotta);
  color: #fff;
  border: 1px solid var(--terracotta);
  box-shadow: 0 6px 18px rgba(194, 89, 63, 0.15);
}

.btn-primary:hover {
  background-color: var(--terracotta-dark);
  border-color: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(194, 89, 63, 0.25);
}

.btn-secondary {
  background-color: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  margin-top: 10px;
}

.btn-secondary:hover {
  background-color: rgba(29, 67, 117, 0.05);
  transform: translateY(-2px);
}


/* FOOTER & RE-OPEN */
.invite-footer {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.back-to-envelope-btn {
  background: transparent;
  border: none;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: var(--text-light);
  text-transform: uppercase;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 20px;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-to-envelope-btn:hover {
  color: var(--terracotta);
  background-color: rgba(194, 89, 63, 0.06);
}

.back-to-envelope-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transform: rotate(180deg);
}


/* KEYFRAMES & UTILS */
@keyframes pulse-helper {

  0%,
  100% {
    opacity: 0.8;
  }

  50% {
    opacity: 0.35;
  }
}

@keyframes bounce-arrow {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(6px);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Background floating botanical ornaments */
.scene-ornament {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 8px 15px rgba(28, 45, 82, 0.06));
}

body.envelope-opening .scene-ornament,
body.invitation-open .scene-ornament {
  display: none;
}

body:not(.invitation-open) {
  overflow: hidden;
  height: 100vh;
}

.scene-ornament.top-left {
  top: -20px;
  left: -20px;
  width: 120px;
  height: 120px;
  animation: float-slow 5s ease-in-out infinite alternate;
}

.scene-ornament.bottom-right {
  bottom: 10px;
  right: -25px;
  width: 150px;
  height: 150px;
  animation: float-slow 6s ease-in-out infinite alternate-reverse;
}

@keyframes float-slow {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-6px) rotate(3deg);
  }
}

/* RESPONSIVE LAYOUT SCALING */
@media (max-width: 480px) {
  .envelope-wrapper {
    width: 100cqi;
    height: 100vh;
    max-width: none;
  }

  .wax-seal {
    width: 100%;
    height: 100%;
  }

  .wax-seal-monogram {
    font-size: 2.2rem;
  }

  .hero-names {
    font-size: 3.4rem;
  }

  .invite-scroller {
    padding-top: 70px;
  }

  .invite-section {
    padding: 30px 18px;
  }
}

/* =========================================
   RSVP FORM SECTION
   ========================================= */
.rsvp-form-section {
  width: 100cqi;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0px 20px 40px 20px;
  background-image: url('images/regalo_web.jpg');
  background-size: 400% auto;
  background-position: center bottom;
  background-repeat: no-repeat;
  position: relative;
}

.form-wrapper {
  margin-top: -30px;
  padding: 0px 20px 40px 20px;
  width: 100%;
  max-width: 600px;
}

.form-title {
  font-family: var(--font-display);
  color: var(--navy);
  text-align: center;
  font-size: clamp(1.4rem, 5cqi, 2rem);
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.form-group {
  margin-bottom: 25px;
  text-align: left;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.half-width {
  flex: 1;
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--navy-light);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.radio-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.radio-label input[type="radio"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--navy-light);
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  background-color: #fff;
}

.radio-label input[type="radio"]:checked {
  border-color: var(--navy);
}

.radio-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-color: var(--navy);
  border-radius: 50%;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid rgba(42, 90, 158, 0.2);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--navy);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(42, 90, 158, 0.1);
}

.form-input::placeholder {
  color: rgba(29, 67, 117, 0.4);
}

.number-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.number-input {
  padding-right: 45px;
}

.number-label {
  position: absolute;
  right: 15px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--navy-light);
  pointer-events: none;
}

.select-input {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%232A5A9E%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 15px top 50%;
  background-size: 12px auto;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  margin-top: 25px;
  background-color: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 40px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: none;
}

.btn-submit:hover {
  background-color: var(--navy);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(29, 67, 117, 0.2);
}

.btn-submit:active {
  transform: translateY(0);
}

@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .half-width {
    margin-bottom: 25px;
  }
}

/* Desktop Responsive Frame */
@media (min-width: 500px) {
  html {
    background-color: #d5cabd;
  }

  body {
    display: block;
    /* Prevents flex-center bug that hides top content */
    width: 414px;
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: none;
    background-color: transparent;
    background-image: none !important;
    position: relative;
  }

  body::before {
    width: 414px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.9s ease 0.3s;
  }

  body.invitation-open::before {
    opacity: 0.03;
  }

  .envelope-stage {
    width: 414px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    background: transparent;
  }

  body.envelope-opening .envelope-stage {
    background: transparent !important;
  }

  body.envelope-opening .envelope-wrapper {
    opacity: 1 !important;
    transition: transform 0.9s ease 0.35s !important;
  }

  .envelope-wrapper {
    width: min(100%, 62.4vh) !important;
  }

  .invite-card-container {
    display: none !important;
  }

  .fixed-controls {
    right: calc(50% - 207px + 20px) !important;
  }

  .invite-container {
    display: block;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.2) !important;
    background-color: hsl(var(--background)) !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E") !important;
    background-blend-mode: overlay !important;
    background-size: 180px !important;
    background-attachment: fixed !important;
    position: relative;
    overflow-x: hidden;
    transition: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  body.invitation-open .invite-container {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .home-screen,
  .image-screen {
    width: 100% !important;
    max-height: none !important;
    /* Prevents squashing on short landscape screens */
    height: auto !important;
  }

  .rsvp-form-section {
    min-height: auto !important;
  }
}

body {
  container-type: inline-size;
}

.invite-container {
  container-type: inline-size;
}
/* AUDIO BUTTON */
.audio-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  fill: var(--navy);
  opacity: 0;
  pointer-events: none;
}

.audio-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.audio-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

.audio-btn svg {
  width: 20px;
  height: 20px;
}

/* --- CUSTOM ALERT MODAL --- */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-alert-overlay.show {
  opacity: 1;
  visibility: visible;
}

.custom-alert-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 35px 30px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 85%;
  width: 360px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(220, 196, 150, 0.4);
}

.custom-alert-overlay.show .custom-alert-box {
  transform: scale(1);
}

#custom-alert-message {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .half-width {
    margin-bottom: 25px;
  }
}

/* Desktop Responsive Frame */
@media (min-width: 500px) {
  html {
    background-color: #d5cabd;
  }

  body {
    display: block;
    /* Prevents flex-center bug that hides top content */
    width: 414px;
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: none;
    background-color: transparent;
    background-image: none !important;
    position: relative;
  }

  body::before {
    width: 414px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.9s ease 0.3s;
  }

  body.invitation-open::before {
    opacity: 0.03;
  }

  .envelope-stage {
    width: 414px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    background: transparent;
  }

  body.envelope-opening .envelope-stage {
    background: transparent !important;
  }

  body.envelope-opening .envelope-wrapper {
    opacity: 1 !important;
    transition: transform 0.9s ease 0.35s !important;
  }

  .envelope-wrapper {
    width: min(100%, 62.4vh) !important;
  }

  .invite-card-container {
    display: none !important;
  }

  .fixed-controls {
    right: calc(50% - 207px + 20px) !important;
  }

  .invite-container {
    display: block;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.2) !important;
    background-color: hsl(var(--background)) !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E") !important;
    background-blend-mode: overlay !important;
    background-size: 180px !important;
    background-attachment: fixed !important;
    position: relative;
    overflow-x: hidden;
    transition: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  body.invitation-open .invite-container {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .home-screen,
  .image-screen {
    width: 100% !important;
    max-height: none !important;
    /* Prevents squashing on short landscape screens */
    height: auto !important;
  }

  .rsvp-form-section {
    min-height: auto !important;
  }
}

body {
  container-type: inline-size;
}

.invite-container {
  container-type: inline-size;
}
/* AUDIO BUTTON */
.audio-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  fill: var(--navy);
  opacity: 0;
  pointer-events: none;
}

.audio-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.audio-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

.audio-btn svg {
  width: 20px;
  height: 20px;
}

/* --- CUSTOM ALERT MODAL --- */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-alert-overlay.show {
  opacity: 1;
  visibility: visible;
}

.custom-alert-box {
  background: rgba(255, 255, 255, 0.95);
  padding: 35px 30px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 85%;
  width: 360px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(220, 196, 150, 0.4);
}

.custom-alert-overlay.show .custom-alert-box {
  transform: scale(1);
}

#custom-alert-message {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: 25px;
  line-height: 1.6;
}

.custom-alert-close {
  background-color: var(--navy);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(29, 67, 117, 0.3);
}

.custom-alert-close:hover {
  background-color: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 67, 117, 0.5);
}
