/* variables */
:root {
  --accent: #2c2c2c;
  --ink: #1a1a1a;
  --bg: #f5f5f5;
  --gold: #c9b896;
  --muted: #6b6b6b;
  --card: rgba(255, 255, 255, 0.95);
  --border-light: #e5e5e5;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08),
    0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.06);

  /* spacing */
  --section-padding-block: clamp(16px, 3.2vw, 28px);
  --section-padding-inline: clamp(12px, 3vw, 24px);
  --section-gap: clamp(6px, 1.2vw, 12px);
  --heading-margin: clamp(8px, 1.4vw, 12px);
  --element-gap: clamp(10px, 2vw, 16px);
  --card-padding: clamp(14px, 2.4vw, 20px);

  /* typography */
  --fs-h1: clamp(36px, 6vw, 56px);
  --fs-h2: clamp(22px, 3.6vw, 28px);
  --fs-script-lg: clamp(32px, 5.5vw, 44px);
  --fs-script-md: clamp(24px, 4.5vw, 34px);
  --fs-lead: clamp(18px, 3vw, 22px);
  --fs-body: clamp(14px, 2vw, 16px);
  --fs-small: clamp(12px, 1.8vw, 14px);
  --lh-tight: 1.3;
  --lh-normal: 1.6;
  --ls-wide: 0.04em;
}

/* reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.6;
  min-width: 360px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

p {
  margin: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

body > * {
  position: relative;
  z-index: 2;
}

/* accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.main-container {
  max-width: 100%;
  margin: 0 auto;
  background: transparent;
  position: relative;
}

.section {
  padding-block: 0;
  padding-inline: var(--section-padding-inline);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: var(--element-gap) auto 0;
  box-sizing: border-box;
}

.section-1,
.thankyou-section {
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.section-1 {
  justify-content: space-evenly;
  gap: var(--element-gap);
  padding: 0;
  margin: 0 auto;
}

.section-1 header {
  flex-shrink: 0;
  margin-top: clamp(40px, 6vw, 80px);
}

.section-1 header h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 600;
  font-style: italic;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: var(--lh-tight);
  margin-bottom: clamp(12px, 2vw, 16px);
}

.section-1 header h2 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(38px, 6.5vw, 52px);
  font-weight: 400;
  line-height: var(--lh-tight);
  color: var(--accent);
  margin-bottom: 0;
  animation: fadeInScale 2s ease-out;
  white-space: nowrap;
}

@keyframes fadeInScale {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  60% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.event-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 40px);
  color: var(--ink);
  margin: 0;
  text-align: center;
  flex-shrink: 0;
}

.time-left {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: "Montserrat", sans-serif;
}

.time-left .time-hour {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 500;
  display: block;
}

.time-left .time-day {
  font-size: clamp(22px, 3.5vw, 26px);
  font-weight: 600;
  margin-top: 4px;
}

.divider {
  width: 2px;
  height: clamp(60px, 10vw, 70px);
  background: #aaa;
}

.time-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.time-right .date-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.date-number {
  font-size: clamp(38px, 6vw, 48px);
  font-weight: 600;
  line-height: 1;
  font-family: "Playfair Display", serif;
  font-style: italic !important;
}

.date-year {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-size: clamp(28px, 4vw, 32px);
  font-weight: 500;
  font-family: "Playfair Display", serif;
  gap: 2px;
  font-style: italic !important;
}

.lunar-date {
  font-style: italic;
  font-size: clamp(14px, 2vw, 16px);
  color: #666;
  margin-top: 0;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  flex-shrink: 0;
}

.wedding-quote {
  margin: 0;
  max-width: 90%;
  text-align: center;
  position: relative;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.wedding-quote p {
  font-family: "Great Vibes", cursive;
  font-size: clamp(20px, 3.5vw, 26px);
  font-style: italic;
  color: #2c2c2c;
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wedding-quote .quote-line {
  display: block;
}

.main-photo {
  margin: 0;
  flex-shrink: 0;
}

.main-photo img {
  width: min(85%, 640px);
  height: auto;
  border-radius: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 6px 20px rgba(0, 0, 0, 0.1),
    0 3px 10px rgba(0, 0, 0, 0.08);
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: subpixel-antialiased;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.main-photo img:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2), 0 8px 25px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px) translateZ(0);
}

.family-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--element-gap);
  max-width: 1000px;
  margin-block: var(--element-gap);
  margin-inline: auto;
  width: 100%;
}

.family-row {
  display: grid;
  grid-template-columns: 5fr 5fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  width: 100%;
}

#familyRowBride {
  grid-template-columns: 5fr 5fr;
}

.family-photo {
  margin: 0;
  overflow: visible;
  border-radius: 0;
  height: 100%;
}

.family-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 1s ease, transform 1s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.family-row:first-child .family-photo img {
  opacity: 0;
  transform: translateX(-100px);
}

.family-row:last-child .family-photo img {
  opacity: 0;
  transform: translateX(100px);
}

.family-photo.visible img {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

.family-info {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: auto;
}

.family-info.left {
  align-items: center;
  text-align: center;
}

.family-info.right {
  align-items: center;
  text-align: center;
}

.family-info strong {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 3.5vw, 26px);
  letter-spacing: 0.02em;
  color: var(--accent);
  display: block;
  margin-bottom: clamp(12px, 2vw, 16px);
}

.family-info p,
.family-info address {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 1.6;
  margin-bottom: clamp(6px, 1.2vw, 8px);
  color: var(--ink);
  font-style: normal;
}

.family-info .parent-name {
  font-family: "Great Vibes", cursive;
  font-weight: 700;
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.6;
}

.person-icon {
  margin-top: clamp(16px, 3vw, 24px);
  padding-top: clamp(16px, 3vw, 24px);
  border-top: 2px solid rgba(192, 57, 43, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1vw, 6px);
}

.person-icon i {
  font-size: clamp(32px, 5vw, 48px);
  color: var(--gold);
}

.person-icon-img {
  width: clamp(64px, 10vw, 96px);
  height: clamp(64px, 10vw, 96px);
  object-fit: cover;
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.person-name {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(16px, 2.8vw, 20px);
  font-weight: 700;
  color: var(--muted);
  margin: 0;
  line-height: 1.2;
}

.person-name:last-of-type {
  font-family: "Great Vibes", cursive;
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 700;
  color: var(--accent);
}

.invitation-section {
  padding: clamp(40px, 6vw, 60px) clamp(20px, 4vw, 40px);
}

.invitation-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 400;
  color: var(--accent);
  margin-bottom: clamp(8px, 1.5vw, 12px);
  line-height: 1.2;
}

.invitation-subtitle {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(12px, 2vw, 14px);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
}

.invitation-subtitle .couple-names {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.gallery-section {
  margin-block: var(--element-gap);
  max-width: 100%;
}

.invitation-gallery {
  --H: clamp(260px, 42vh, 560px);
  display: grid;
  grid-template-columns: 3fr 4fr 3fr;
  align-items: center;
  gap: clamp(12px, 2.5vw, 20px);
  max-width: 1100px;
  margin: 0 auto clamp(20px, 3vw, 30px);
  padding: 0 clamp(10px, 2vw, 20px);
}

.gallery-left {
  aspect-ratio: 3/4;
  width: 100%;
  object-fit: cover;
}

.gallery-center {
  aspect-ratio: 2/3;
  width: 100%;
  object-fit: cover;
}

.gallery-right {
  aspect-ratio: 3/4;
  width: 100%;
  object-fit: cover;
}

.invitation-gallery img {
  display: block;
  width: 100%;
  height: var(--itemH);
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(0, 0, 0, 0.12));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.invitation-gallery img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md, 0 12px 28px rgba(0, 0, 0, 0.16));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.heart-decoration {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  opacity: 0.8;
}

.heart-decoration img {
  width: auto;
  height: auto;
  max-width: clamp(100px, 15vw, 180px);
  display: block;
  background: transparent;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* event + calendar */
.event-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--element-gap);
  width: 100%;
}

.event-detail,
.calendar-pane {
  display: flex;
  flex-direction: column;
}

.event-detail .event-block {
  margin-top: auto;
  margin-bottom: 0;
}

.event-detail {
  display: flex;
  justify-content: center;
  width: 100%;
}

.event-block {
  background: transparent;
  border: none;
  border-radius: 12px;
  box-shadow: none;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.event-time-section {
  display: flex;
  flex-direction: column;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  color: var(--ink);
  margin-bottom: clamp(16px, 3vw, 20px);
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 32px);
}

.event-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: clamp(80px, 18vw, 140px);
}

.event-col.center {
  min-width: clamp(120px, 25vw, 160px);
}

.event-col.left img,
.event-col.right img {
  width: clamp(70px, 14vw, 100px);
  height: clamp(70px, 14vw, 100px);
  border-radius: 50%;
  object-fit: cover;
}

.event-time-text,
.event-year {
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 500;
  color: var(--ink);
}

.divider {
  width: 2px;
  height: clamp(60px, 12vw, 80px);
  background: linear-gradient(
    to bottom,
    transparent,
    var(--accent) 10%,
    var(--accent) 90%,
    transparent
  );
  flex-shrink: 0;
}

.event-label {
  font-weight: 400;
  font-size: clamp(14px, 2.5vw, 16px);
  margin-bottom: clamp(4px, 1vw, 6px);
  color: var(--ink);
}

.event-day {
  font-size: clamp(18px, 3.5vw, 22px);
  font-weight: 600;
  color: var(--accent);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.event-date .day {
  display: block;
  font-size: clamp(80px, 18vw, 120px);
  font-weight: 700;
  line-height: 0.9;
  color: var(--accent);
}

.event-date .month {
  display: block;
  font-size: clamp(18px, 3.5vw, 22px);
  font-weight: 600;
  color: var(--ink);
}

.lunar-date {
  font-style: italic;
  font-size: clamp(13px, 2vw, 15px);
  color: #666;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
}

.calendar-pane {
  text-align: center;
  position: relative;
  background: url("../images/calendar_background.jpg") center/cover no-repeat;
  padding: clamp(30px, 4vw, 50px) clamp(40px, 6vw, 80px);
  border-radius: 0;
  overflow: visible;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  min-height: 500px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(0, 0, 0, 0.06),
    0 2px 5px rgba(0, 0, 0, 0.04);
}

.calendar-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
  z-index: 0;
}

.calendar-pane > * {
  position: relative;
  z-index: 1;
}

.calendar-pane .save-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(56px, 10vw, 80px);
  font-weight: 400;
  color: #2c2c2c;
  margin-bottom: clamp(12px, 2vw, 16px);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 12px);
  flex-wrap: wrap;
}

.calendar-pane .save-title .the {
  font-family: "Great Vibes", cursive;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 400;
  position: relative;
  display: inline-block;
  margin: 0 clamp(4px, 1vw, 8px);
}

.calendar-pane .save-title .the::before {
  content: "♥";
  position: absolute;
  font-size: clamp(40px, 7vw, 56px);
  color: #ff9999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0.6;
}

.calendar-pane .month-year {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: #2c2c2c;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: clamp(24px, 4vw, 32px);
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(6px, 1.2vw, 10px);
  max-width: 600px;
  margin: 0 auto;
  background: transparent;
  padding: clamp(20px, 3.5vw, 32px);
  border-radius: 16px;
  box-shadow: none;
}

.calendar-row {
  display: contents;
}

.calendar-row div {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: clamp(15px, 2.8vw, 20px);
  line-height: 1;
  padding: clamp(10px, 2vw, 14px);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(40px, 7vw, 56px);
  color: #2c2c2c;
}

.calendar-row.header div {
  background: rgba(150, 150, 150, 0.6);
  font-weight: 700;
  font-size: clamp(13px, 2.3vw, 16px);
  border-radius: 0;
  color: #2c2c2c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 calc(clamp(6px, 1.2vw, 10px) / -2);
  padding-left: calc(clamp(6px, 1.2vw, 10px) / 2);
  padding-right: calc(clamp(6px, 1.2vw, 10px) / 2);
}

.calendar-row.header div:first-child {
  margin-left: 0;
  padding-left: clamp(10px, 2vw, 14px);
  border-radius: 0;
}

.calendar-row.header div:last-child {
  margin-right: 0;
  padding-right: clamp(10px, 2vw, 14px);
  border-radius: 0;
}

.calendar-row div.highlight {
  position: relative;
  font-weight: 700;
  color: #2c2c2c;
  z-index: 1;
}

.calendar-row div.highlight::before {
  content: "♥";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(48px, 10vw, 64px);
  color: #ff6b9d;
  z-index: -1;
  opacity: 0.85;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.calendar-row div.highlight::after {
  content: none;
}

.calendar-day:hover {
  background: var(--border-light);
}

.calendar-day.wedding-day {
  background: var(--accent);
  color: white;
  font-weight: 700;
  position: relative;
}

.calendar-day.wedding-day::after {
  content: "♥";
  position: absolute;
  top: -2px;
  right: -2px;
  color: var(--gold);
  font-size: clamp(8px, 1.2vw, 10px);
}

.calendar-day.other-month {
  color: var(--muted);
  opacity: 0.5;
}

#rsvp-title {
  font-family: "Montserrat", sans-serif;
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--ink);
  margin-bottom: var(--element-gap);
  margin-top: var(--element-gap);
  white-space: nowrap;
}

.form-section {
  max-width: 600px;
  width: 100%;
}

.form-container {
  background: transparent;
  backdrop-filter: none;
  padding: var(--card-padding);
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.form-control {
  font-family: "Montserrat", sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: 500;
  border: 2px solid #cbd5e0;
  border-radius: 0;
  padding: clamp(10px, 2vw, 14px);
  margin-bottom: clamp(10px, 2vw, 14px);
  transition: all 300ms ease;
  width: 100%;
  background: transparent;
}

.form-control:focus {
  border-color: #6ba3d8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(107, 163, 216, 0.15);
  background: transparent;
}

.form-control::placeholder {
  color: var(--muted);
}

.btn-submit {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: var(--lh-tight);
  background: white;
  border: 2px solid #ff6b9d;
  padding: clamp(14px, 2.5vw, 18px) clamp(20px, 4vw, 40px);
  border-radius: 0;
  color: #ff4d8b;
  width: 33.333%;
  min-width: fit-content;
  transition: all 300ms ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-shadow: none;
  white-space: nowrap;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff4d8b 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 157, 0.4);
}

.location-section {
  text-align: center;
  padding: 0 var(--section-padding-inline);
  margin-top: var(--element-gap);
  background: linear-gradient(135deg, #ffe8f0 0%, #ffd6e4 50%, #ffc9dd 100%);
  border-top-left-radius: clamp(120px, 25vw, 180px);
  border-top-right-radius: clamp(120px, 25vw, 180px);
  box-shadow: 0 8px 24px rgba(255, 107, 157, 0.12);
  width: calc(100% - 2 * var(--section-padding-inline));
  margin-inline: auto;
}

.location-header {
  padding: clamp(20px, 3vw, 30px) 0 clamp(15px, 2.5vw, 20px);
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.location-icon {
  width: clamp(80px, 15vw, 120px);
  height: clamp(80px, 15vw, 120px);
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: clamp(12px, 2vw, 16px);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.location-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(28px, 5vw, 36px);
  color: #1a1a1a;
  margin-bottom: clamp(4px, 0.8vw, 6px);
  font-weight: 400;
}

.location-name {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(18px, 3.5vw, 22px);
  font-weight: 700;
  color: #2c2c2c;
  margin-bottom: clamp(3px, 0.6vw, 5px);
  line-height: 1.4;
}

.location-address {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(14px, 2.5vw, 16px);
  color: #444;
  line-height: 1.6;
  margin: 0;
}

.location-map {
  padding: 0 0 clamp(20px, 3vw, 30px);
  max-width: 1000px;
  margin: 0 auto;
}

.location-map iframe {
  width: 100%;
  height: clamp(250px, 35vw, 450px);
  border: none;
  border-radius: clamp(12px, 2vw, 16px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(16px, 2.5vw, 20px);
  padding: clamp(10px, 2vw, 12px) clamp(16px, 3vw, 20px);
  background: white;
  color: #ff4d8b;
  text-decoration: none;
  border-radius: 25px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(13px, 2.2vw, 15px);
  font-weight: 600;
  transition: all 300ms ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 2px solid #ff6b9d;
}

.map-link:hover {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff4d8b 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 157, 0.4);
}

.map-link i {
  font-size: clamp(14px, 2.5vw, 16px);
}

#album-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--ink);
  margin-bottom: var(--element-gap);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(12px, 2vw, 20px);
  width: 100%;
}

#album-title::after {
  content: "";
  flex: 1 1 auto;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2.5vw, 20px);
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.album-grid img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  opacity: 1;
  transition: none;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  will-change: transform, opacity;
  transform: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-sizing: border-box;
}

.album-grid img:hover {
  transform: scale(1.03) translateZ(0);
  box-shadow: var(--shadow-md);
}

@media (min-width: 992px) {
  .album-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .album-grid img {
    max-height: 360px;
  }
}

.thankyou-section {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: visible;
  margin-top: var(--element-gap);
  padding: 0;
  width: 100%;
  max-width: 100%;
}

.thankyou-section img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 24px);
  box-sizing: border-box;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.lightbox-img {
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  background: #000;
  display: block;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  backdrop-filter: blur(6px);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  font-size: 18px;
  font-weight: 600;
}

.lightbox-close {
  top: -14px;
  right: -14px;
}

.lightbox-prev {
  left: -56px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: -56px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close:hover {
  transform: scale(1.05);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.05);
}

body.lightbox-open {
  overflow: hidden !important;
}

/* responsive */
@media (min-width: 1200px) {
  .main-container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .section {
    padding-block: 0;
    padding-inline: clamp(16px, 4vw, 28px);
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .section {
    padding-block: 0;
    padding-inline: clamp(14px, 3.5vw, 24px);
  }
}

@media (max-width: 640px) {
  .invitation-gallery {
    grid-template-columns: 1fr 1.35fr 1fr;
    --H: clamp(180px, 38vh, 340px);
    gap: clamp(8px, 2vw, 12px);
  }
}

@media (max-width: 420px) {
  .invitation-gallery {
    grid-template-columns: 1fr 1.3fr 1fr;
    --H: clamp(160px, 36vh, 300px);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --accent: #000000;
    --ink: #000000;
    --muted: #000000;
    --border-light: #000000;
  }
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .door-wrapper,
  .thankyou-section img {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .section {
    min-height: auto !important;
    page-break-inside: avoid;
  }
}

@media (max-width: 767px) {
  .main-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    width: 100%;
  }

  .section {
    text-align: center;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .section-1 header h2 {
    font-size: clamp(28px, 5.5vw, 42px);
  }

  .invitation-subtitle {
    font-size: clamp(10px, 1.8vw, 13px);
  }

  #rsvp-title {
    font-size: clamp(18px, 3.5vw, 24px);
  }

  .family-info-wrapper {
    gap: clamp(20px, 4vw, 30px);
  }

  .family-row {
    grid-template-columns: 4.2fr 5.8fr;
    gap: clamp(2px, 0.5vw, 3px);
  }

  #familyRowBride {
    grid-template-columns: 5.8fr 4.2fr;
  }

  .family-photo {
    height: 100%;
  }

  .family-photo img {
    height: 100%;
    object-fit: cover;
  }

  .family-info {
    text-align: center;
    min-height: auto;
    padding: 0;
  }

  .family-info strong {
    font-size: clamp(16px, 3vw, 20px);
    margin-bottom: clamp(6px, 1.2vw, 10px);
  }

  .family-info p,
  .family-info address {
    font-size: clamp(12px, 2vw, 14px);
    margin-bottom: clamp(3px, 0.8vw, 5px);
  }

  .person-icon {
    margin-top: clamp(8px, 1.6vw, 12px);
    padding-top: clamp(8px, 1.6vw, 12px);
    gap: clamp(4px, 1vw, 8px);
  }

  .person-icon i {
    font-size: clamp(22px, 4vw, 30px);
  }

  .person-name {
    font-size: clamp(14px, 2.5vw, 16px);
  }

  .person-name:last-of-type {
    font-size: clamp(24px, 4.5vw, 30px);
  }

  .calendar-pane {
    padding: clamp(8px, 2vw, 15px) clamp(5px, 1vw, 10px);
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    min-height: auto;
  }

  .invitation-section {
    padding: clamp(20px, 4vw, 30px) clamp(10px, 2vw, 15px);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .event-layout {
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  .event-detail {
    width: 100%;
    max-width: 100%;
    padding: 0 clamp(3px, 0.8vw, 6px);
  }

  .event-detail .event-block {
    margin: 0;
    max-width: 100%;
    width: 100%;
    padding: clamp(5px, 1.2vw, 10px);
  }

  .event-row {
    width: 100%;
    max-width: 100%;
    gap: clamp(6px, 1.8vw, 12px);
    padding: 0;
    margin: 0;
  }

  .event-col {
    min-width: 0;
    flex: 1;
    max-width: 100%;
    padding: clamp(2px, 0.5vw, 4px);
  }

  .event-col.center {
    min-width: 0;
    flex: 1.1;
  }

  .event-col.left img,
  .event-col.right img {
    width: clamp(50px, 10vw, 70px);
    height: clamp(50px, 10vw, 70px);
  }

  .divider {
    width: 1px;
    height: clamp(35px, 7vw, 50px);
  }

  .event-date .day {
    font-size: clamp(50px, 12vw, 75px);
  }

  .event-date .month {
    font-size: clamp(16px, 3.2vw, 20px);
  }

  .event-time-text,
  .event-year {
    font-size: clamp(13px, 2.6vw, 17px);
  }

  .event-label {
    font-size: clamp(12px, 2.4vw, 15px);
    margin-bottom: clamp(3px, 0.8vw, 4px);
  }

  .event-day {
    font-size: clamp(16px, 3.2vw, 20px);
  }

  .event-time-section {
    margin-bottom: clamp(8px, 1.8vw, 12px);
    padding: clamp(3px, 0.8vw, 6px);
  }

  .lunar-date {
    font-size: clamp(12px, 2.2vw, 14px);
    margin: clamp(3px, 0.8vw, 5px) 0;
  }

  .calendar {
    gap: clamp(1px, 0.3vw, 2px);
    padding: 0;
    max-width: 90%;
    margin: 0 50px;
  }

  .calendar-row div {
    font-size: clamp(14px, 2.8vw, 18px);
    min-height: clamp(32px, 6vw, 40px);
    padding: clamp(3px, 0.8vw, 6px);
  }

  .calendar-row.header div {
    background: rgba(150, 150, 150, 0.6);
    font-weight: 700;
    font-size: clamp(12px, 2.4vw, 16px);
    border-radius: 0;
    color: #2c2c2c;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 calc(clamp(1px, 0.3vw, 2px) / -2);
    padding-left: calc(clamp(1px, 0.3vw, 2px) / 2);
    padding-right: calc(clamp(1px, 0.3vw, 2px) / 2);
  }

  .calendar-row.header div:first-child {
    margin-left: 0;
    padding-left: clamp(2px, 0.5vw, 4px);
    border-radius: 0;
  }

  .calendar-row.header div:last-child {
    margin-right: 0;
    padding-right: clamp(2px, 0.5vw, 4px);
    border-radius: 0;
  }

  .calendar-row div.highlight::before {
    font-size: clamp(32px, 6.5vw, 42px);
  }

  .calendar-pane .save-title {
    font-size: clamp(28px, 5.5vw, 38px);
    margin-bottom: clamp(4px, 1vw, 8px);
    gap: clamp(4px, 0.8vw, 8px);
    line-height: 1;
  }

  .calendar-pane .save-title .the {
    font-size: clamp(14px, 2.8vw, 20px);
    margin: 0 clamp(1px, 0.3vw, 2px);
  }

  .calendar-pane .save-title .the::before {
    font-size: clamp(32px, 5.5vw, 42px);
  }

  .calendar-pane .month-year {
    font-size: clamp(12px, 2.4vw, 16px);
    margin-bottom: clamp(8px, 2vw, 12px);
    letter-spacing: 0.02em;
  }

  .form-container {
    padding: clamp(14px, 3vw, 20px);
  }

  .btn-submit {
    width: 50%;
    min-width: 120px;
    font-size: clamp(14px, 3vw, 16px);
    padding: clamp(12px, 2.5vw, 14px) clamp(16px, 3vw, 24px);
  }

  /* Album remains 2 columns on mobile */
  .album-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(6px, 1.5vw, 10px);
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }

  .album-grid img {
    height: clamp(250px, 40vw, 350px);
    object-fit: cover;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .section {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .thankyou-section {
    overflow-x: hidden;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
  }

  .lightbox-overlay.open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, 0.9) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10050 !important;
  }

  .lightbox-overlay.open .lightbox-content {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 60px 20px 20px 20px !important;
    box-sizing: border-box !important;
  }

  .lightbox-overlay.open .lightbox-img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    display: block !important;
  }

  .lightbox-overlay.open .lightbox-prev,
  .lightbox-overlay.open .lightbox-next {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    color: white !important;
    font-size: 18px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10051 !important;
  }

  .lightbox-overlay.open .lightbox-prev {
    left: 20px !important;
  }

  .lightbox-overlay.open .lightbox-next {
    right: 20px !important;
  }

  .lightbox-overlay.open .lightbox-close {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    color: white !important;
    font-size: 18px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10051 !important;
  }

  .notification-toast {
    top: 10px;
    min-width: 280px;
    padding: clamp(12px, 2.5vw, 16px) clamp(16px, 3vw, 20px);
  }
}

.notification-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 10100;
  min-width: 300px;
  max-width: 90vw;
  padding: clamp(16px, 3vw, 20px) clamp(20px, 4vw, 28px);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.notification-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.notification-success {
  background: linear-gradient(
    135deg,
    rgba(76, 175, 80, 0.95) 0%,
    rgba(56, 142, 60, 0.95) 100%
  );
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.notification-error {
  background: linear-gradient(
    135deg,
    rgba(244, 67, 54, 0.95) 0%,
    rgba(211, 47, 47, 0.95) 100%
  );
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Montserrat", sans-serif;
}

.notification-icon {
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 700;
  flex-shrink: 0;
  width: clamp(32px, 6vw, 40px);
  height: clamp(32px, 6vw, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.notification-message {
  font-size: clamp(14px, 2.5vw, 16px);
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}
