:root {
  --wine: #78152f;
  --wine-deep: #531024;
  --gold: #b39057;
  --ink: #32262a;
  --muted: #71666a;
  --ivory: #fffdf9;
  --paper: #fff;
}

html { background: #fff; scroll-behavior: smooth; }
.invitation-page { overflow-x: hidden; background: #fff; color: var(--ink); }
.invitation-shell {
  position: relative;
  width: min(100%, 768px);
  min-height: 100vh;
  margin-inline: auto;
  overflow: clip;
  background: #fff;
  border-inline: 1px solid #c7a56a40;
  box-shadow: 0 0 38px #4d182008;
}
.invitation-shell .site-header {
  width: 100%;
  min-height: 4.3rem;
  padding: .5rem clamp(1rem, 5vw, 2.2rem);
  border-color: #b390573b;
  background: #fff;
}
.invitation-shell .brand { color: var(--wine); }
.invitation-shell .brand svg { fill: #fff; stroke: var(--gold); }
.header-tools { display: flex; align-items: center; gap: .7rem; }
.invitation-shell .header-link { color: var(--wine); font-size: .86rem; }

.invitation-hero {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(1.1rem, 3vw, 1.8rem) clamp(.7rem, 3.3vw, 1.5rem) 1.4rem;
  background: #fff;
}
.invitation-hero::before, .invitation-hero::after { content: none; animation: none; }
.invitation-cover {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 7px;
  border: 1px solid var(--gold);
  background: #fff;
  box-shadow: 0 12px 30px #4e16200d, inset 0 0 0 2px #fff, inset 0 0 0 3px #b3905740;
}
.cover-photo { width: 100%; min-width: 0; height: clamp(245px, 81vw, 430px); padding: 5px 5px 0; background: #fff; }
.cover-photo img { max-width: 100%; object-position: center 34%; border: 1px solid #d2bd98; }
.hero-frame {
  min-height: 0;
  padding: clamp(1.45rem, 5vw, 2.1rem) 1rem clamp(1.5rem, 5vw, 2.1rem);
  border-top: 1px solid #b3905780;
  background: #fff;
  background-image: url("./rose-lily-corner.svg");
  background-position: left bottom;
  background-size: clamp(2.6rem, 10vw, 4rem) clamp(3.3rem, 14vw, 5rem);
  background-repeat: no-repeat;
}
.hero-frame::after { inset: 7px; border-color: #b390573d; }
.hero-frame::before, .hero-frame::after { pointer-events: none; }
.hero-frame::before {
  content: "";
  position: absolute;
  bottom: .4rem;
  right: .4rem;
  width: clamp(2.6rem, 10vw, 4rem);
  height: clamp(3.3rem, 14vw, 5rem);
  background: url("./rose-lily-corner.svg") top right / contain no-repeat;
  opacity: .48;
  animation: floral-sway 9s ease-in-out infinite;
}
.hero-kicker { color: var(--muted); font-size: .96rem; }
.hero-names {
  margin: .08rem 0 .1rem;
  color: var(--wine);
  font-size: clamp(3.4rem, 12vw, 5.2rem);
  line-height: 1.3;
  text-shadow: none;
}
.hero-divider { color: #7e6d5d; }
.hero-divider::before, .hero-divider::after { background: var(--gold); }
.hero-date { margin: .4rem 0 .85rem; color: var(--ink); font-weight: 600; }
.invitation-shell .button { min-height: 2.9rem; border-radius: 2px; }
.invitation-shell .button--primary { border-color: var(--wine); background: var(--wine); color: #fff; box-shadow: 0 5px 14px #78152f24; }
.invitation-shell .button--primary:hover { background: var(--wine-deep); }
.hero-scroll { min-width: 13rem; }

.invitation-shell .content-section {
  padding: clamp(1.8rem, 6vw, 2.65rem) clamp(1rem, 5vw, 2rem);
  background: #fff;
  border-top: 1px solid #b390572b;
}
.invitation-copy {
  width: 100%;
  padding: 1.65rem clamp(.9rem, 4vw, 1.8rem);
  border: 1px solid #b3905785;
  background: #fff;
  box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 6px #b390572b;
}
.invitation-copy::before, .invitation-copy::after {
  width: 3.1rem;
  height: 4rem;
  border: 0;
  background: url("./rose-lily-corner.svg") center / contain no-repeat;
  opacity: .43;
}
.invitation-copy::before { top: .25rem; right: .25rem; transform: rotate(90deg); }
.invitation-copy::after { right: auto; bottom: .25rem; left: .25rem; transform: rotate(-90deg) scaleX(-1); }
.invitation-copy .eyebrow, .eyebrow { color: #8b693d; }
.invitation-copy h2 { color: var(--wine); }
.invitation-copy p:not(.eyebrow) { line-height: 2.1; }
.invitation-signature { color: var(--wine); }
.invitation-date { color: var(--muted); }

.calendar-section, .schedule-section, .gallery-section { background: #fff !important; }
.schedule-section { background: #fff !important; }
.schedule-heading, .calendar-heading, .gallery-heading { margin-bottom: 1.15rem; }
.section-title { margin-bottom: .5rem; color: var(--wine); font-family: var(--display-font); font-size: 1.75rem; }
.section-title::after { background: var(--gold); }
.calendar-wrap { width: 100%; }
.calendar-card {
  max-width: 480px;
  margin-inline: auto;
  padding: .8rem 1rem 1rem;
  border-color: #b3905785;
  background: #fff;
  box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 6px #b390572b;
}
.calendar-month { color: var(--wine); }
.calendar-month strong { color: #8b693d; }
.calendar-table th { color: #755e45; }
.calendar-table td .calendar-event-day { background: var(--wine); }
.calendar-note { border-color: #b3905740; color: var(--wine); }

.timeline {
  width: min(100%, 480px);
  max-width: none;
  margin: 0 auto;
  padding: .1rem 0;
}
.timeline::before { right: 5.45rem; background: #b39057a8; }
.timeline__item {
  grid-template-columns: 4.65rem minmax(0, 1fr);
  gap: 1.55rem;
  min-height: 3.55rem;
  padding: .22rem 0;
}
.timeline__item time {
  grid-column: 1;
  grid-row: 1;
  color: var(--wine);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.timeline__dot {
  position: absolute;
  right: 5.1rem;
  top: 50%;
  width: .65rem;
  height: .65rem;
  transform: translateY(-50%);
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 4px #fff;
}
.timeline__item p {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.details-section {
  width: 100%;
  margin: 0;
  padding: 0 clamp(1rem, 5vw, 2rem);
  background: #fff;
}
.place-panel, .rsvp-panel {
  overflow: hidden;
  padding: 1.75rem clamp(1rem, 5vw, 1.8rem);
  border: 1px solid #b3905770;
  text-align: center;
  background: #fff;
}
.place-panel { border-bottom: 0; }
.place-panel::before, .rsvp-panel::before { inset: .5rem; border-color: #b3905735; }
.panel-heading h2 { color: var(--wine); }
.place-mark { color: var(--gold); stroke: currentColor; }
.place-panel h3 { color: var(--wine); }
.place-panel > p { max-width: 28rem; color: var(--muted); }
.rsvp-panel { border-top: 1px solid #b3905750; background: #fff; }
.rsvp-box { border-color: #b3905740; background: #fff; }
.rsvp-form input[type="text"] { border-color: #c9b99e; }
.radio-option input { accent-color: var(--wine); }

.gallery-section { padding-bottom: 2rem !important; }
.gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.gallery__item { min-width: 0; border-color: #b3905785; padding: 4px; background: #fff; }
.gallery__open {
  display: block;
  width: 100%;
  height: clamp(145px, 45vw, 225px);
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #fff;
  cursor: zoom-in;
}
.gallery__open img { min-height: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery__open:focus-visible { outline: 3px solid var(--wine); outline-offset: -3px; }
.gallery__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.invitation-shell .site-footer {
  margin-top: .4rem;
  padding: 1rem;
  border-color: #b3905740;
  background: #fff;
  color: var(--wine);
}

.music-control {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.3rem;
  padding: .25rem .6rem;
  border: 1px solid #b3905775;
  border-radius: 2rem;
  background: #fff;
  color: var(--wine);
  font-size: .78rem;
  cursor: pointer;
}
.music-control__symbol { font-size: .75rem; }
.volume-control input { display: block; width: 4.6rem; height: 1.7rem; accent-color: var(--wine); }
.photo-lightbox {
  width: min(94vw, 740px);
  max-width: none;
  max-height: 92dvh;
  padding: 2.7rem .6rem .6rem;
  overflow: visible;
  border: 1px solid #b39057a0;
  background: #fff;
  box-shadow: 0 18px 60px #210b1680;
}
.photo-lightbox::backdrop { background: #201219c9; backdrop-filter: blur(3px); }
.photo-lightbox[open] { animation: lightbox-enter .24s ease-out both; }
.photo-lightbox img { display: block; max-width: 100%; max-height: calc(92dvh - 3.4rem); margin-inline: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.photo-lightbox__close {
  position: absolute;
  top: .5rem;
  left: .5rem;
  min-width: 4.5rem;
  min-height: 2rem;
  border: 1px solid #b3905775;
  background: #fff;
  color: var(--wine);
  cursor: pointer;
}
@keyframes floral-sway { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1.5deg) translateY(-2px); } }
@keyframes lightbox-enter { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }

@media (min-width: 600px) {
  .invitation-hero { padding: 1.6rem 1.5rem 1.5rem; }
  .cover-photo { height: 420px; }
  .hero-frame { padding-block: 1.75rem; }
  .invitation-shell .content-section { padding-block: 2.2rem; }
  .timeline__item { min-height: 3.7rem; }
  .gallery { gap: .9rem; }
  .gallery__open { height: 220px; }
}
@media (max-width: 390px) {
  .invitation-shell .site-header { min-height: 3.9rem; gap: .5rem; padding-inline: .75rem; }
  .invitation-shell .brand { gap: .25rem; font-size: .9rem; }
  .invitation-shell .brand svg { width: 1.5rem; height: 1.5rem; }
  .invitation-shell .header-link { font-size: .76rem; }
  .header-tools { gap: .45rem; }
  .hero-names { font-size: 3rem; }
  .timeline__item { grid-template-columns: 4.3rem minmax(0, 1fr); gap: 1.3rem; }
  .timeline::before { right: 5.05rem; }
  .timeline__dot { right: 4.73rem; }
  .gallery { gap: .5rem; }
  .gallery__open { height: 140px; }
}
@media (max-width: 500px) {
  .music-control { width: 2.25rem; min-width: 2.25rem; justify-content: center; padding: .2rem; }
  .music-control__label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .volume-control input { width: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .invitation-page *, .invitation-page *::before, .invitation-page *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
