@font-face {
    font-family: Ovo;
    src: url('../fonts/Ovo-Regular.woff2') format('woff2');
    font-display: swap
}

@font-face {
    font-family: Imperial;
    src: url('../fonts/ImperialScript-Regul.woff') format('woff');
    font-display: swap
}

@font-face {
    font-family: Cinzel;
    src: url('../fonts/cinzel-latin.woff2') format('woff2');
    font-display: swap
}

:root {
    --cream: #f9f0e0;
    --paper: #fff8eb;
    --gold: #a67d2b;
    --ink: #614837;
    --burgundy: #5a0f1b;
    --line: #d9bf83;
    --HeadingFont: Imperial, Georgia, serif;
    --BodyFont: Ovo, Georgia, serif
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--BodyFont);
    font-size: 18px;
    line-height: 1.6
}

body.opening-active,
body.photo-open {
    overflow: hidden
}

button,
a {
    -webkit-tap-highlight-color: transparent
}

button {
    font: inherit;
    cursor: pointer
}

a {
    color: inherit
}

img {
    display: block;
    max-width: 100%;
    height: auto
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--burgundy);
    outline-offset: 5px
}

[hidden] {
    display: none !important
}

h1,
h2,
h3,
p,
figure {
    margin: 0
}

h1,
h2,
h3 {
    font-weight: 400
}

main,
footer {
    overflow: clip
}

.container {
    width: calc(100% - 64px);
    max-width: 940px;
    margin: auto
}

.section {
    padding: 90px 0;
    position: relative
}

.section+.section {
    border-top: 1px solid #b7934933
}

.SectionTitle {
    text-align: center;
    margin-bottom: 44px
}

.SubTitle {
    display:none;
    font-family: Cinzel, Georgia, serif;
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold)
}

.SectionHeading,
.script-title {
    font-family: var(--HeadingFont);
    font-size: 64px;
    color: var(--gold);
    line-height: 1.1;
    margin: 12px 0 18px
}

.SectionTitle p {
    max-width: 450px;
    margin: 0 auto;
    font-size: 17px
}

.CommonButton {
    display:none;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    gap: 8px;
    min-height: 46px;
    padding: 12px 23px;
    border: 1px solid var(--burgundy);
    border-radius: 30px;
    background: var(--burgundy);
    color: var(--paper);
    font-family: Cinzel, Georgia, serif;
    font-size: 10px;
    letter-spacing: 1.6px;
    text-decoration: none;
    transition: transform .25s, background .25s
}

.CommonButton:hover {
    background: #771e2c;
    transform: translateY(-2px)
}

.text-link {
    display:none;
    font-size: 14px;
    color: var(--burgundy);
    text-underline-offset: 5px;
    padding: 10px 0
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 15px;
    z-index: 200;
    padding: 10px;
    background: var(--paper)
}

.skip-link:focus {
    top: 15px
}

#WeddingOpening {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--cream);
    display: grid;
    place-items: center;
    transition: opacity .7s
}

.opening-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.opening-kicker {
    font-size: 15px;
    letter-spacing: 1px;
    display: none;
    margin-bottom: 16px
}

#openInvitation {
    position: relative;
    border: 0;
    padding: 0;
    background: none;
    height: 100vh;
    width:100%;
}

#openInvitation>img {
    height: 100%;
    width: 100%;
    object-fit: cover
}

.opening-names {
    position: absolute;
    left: 5%;
    right: 5%;
    top: 20%;
    font-family: Imperial, serif;
    font-size: 39px;
    color: var(--burgundy)
}

.opening-prompt {
       position: absolute;
    bottom: 25%;
    left: 0;
    right: 0;
    font-family: Cinzel, serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #825b34;
}

.opening-prompt span {
    display: block;
    font-size: 40px;
    margin-top: 5px;
    animation: nudge 2s ease-in-out infinite
}

.opening-inner>time {
    font-family: Cinzel, serif;
    letter-spacing: 4px;
    font-size: 13px;
    margin-top: 18px
}

#openingVideoWrap {
    position: fixed;
    inset: 0;
    z-index: 101;
    background: var(--cream);
    display: grid;
    place-items: center
}

#openingVideo {
    width: 100%;
    max-width: 440px;
    height: 100%;
    object-fit: cover;
}

#skipOpening {
    position: absolute;
    bottom: 25px;
    right: 25px;
    border: 1px solid var(--gold);
    border-radius: 25px;
    padding: 9px 16px;
    background: var(--paper);
    color: var(--ink);
    font-size: 13px
}

#WeddingHero {
    max-width: 700px;
    margin: auto
}

.hero-scene {
    position: relative;
    min-height: 800px;
    height: 100svh;
    max-height: 1100px
}

.hero-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: inherit;
    height: 100%;
    text-align: center;
    padding: 120px 30px 180px;
    text-shadow: 0 1px 8px var(--cream), 0 0 24px var(--cream)
}

.hero-copy>.SubTitle {
    color: #75511c
}

.hero-copy>p:nth-child(2) {
    font-size: 17px;
    margin-top: 9px
}

.hero-copy h1 {
    font-family: Imperial, serif;
    font-size: 87px;
    line-height: .95;
    color: var(--burgundy);
    margin: 30px 0
}

.hero-copy h1 span {
    display: block;
    font-size: 43px;
    margin: 15px 0;
    color: var(--gold)
}

.hero-day {
    font-family: Cinzel, serif;
    font-size: 11px;
    display: none;
    letter-spacing: 3px
}

.hero-copy>time {
    font-family: Cinzel, serif;
    font-size: 21px;
    letter-spacing: 4px;
    margin-top: 12px
}

.hero-scroll {
    position: absolute;
    bottom: clamp(10%, 10%, 20%) !important;
    font-family: Imperial, serif;
    font-size: 35px !important;
    color: #815c1d;
    text-decoration: none
}

.hero-scroll span {
    display: block;
    font-family: Ovo, serif;
    font-size: 24px;
    line-height: 1
}

.ornament {
    width: 180px;
    height: 35px;
    object-fit: contain;
    margin: 0 auto 35px
}

#Welcome {
  text-align: center;
  padding-top: 65px;
  padding-bottom: 0 !important;
}

#Welcome .welcome-copy {
  max-width: 440px;
  margin: 20px auto 26px;
}

#Welcome .hero-family {
  display: block;
  max-width: 470px;
  max-height: 610px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 32px auto 0;
}

#Welcome .palace {
  display: block;
  width: 100%;
  max-width: 660px;
  height: auto;
  margin: 20px auto 0;

  -webkit-mask-image:
    linear-gradient(
      to bottom,
      transparent 0%,
      #000 30%,
      #000 85%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      transparent 0%,
      #000 12%,
      #000 88%,
      transparent 100%
    );
  -webkit-mask-composite: source-in;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;

  mask-image:
    linear-gradient(
      to bottom,
      transparent 0%,
      #000 30%,
      #000 85%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      transparent 0%,
      #000 12%,
      #000 88%,
      transparent 100%
    );
  mask-composite: intersect;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

#WeddingCountdown {
    text-align: center;
    background: #f2e6cf
}
#WeddingLocations{
    display: none;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 42px;
    margin: 24px auto
}

.countdown>div {
    position: relative
}

.countdown>div:not(:last-child):after {
    content: ':';
    position: absolute;
    right: -25px;
    top: 3px;
    font-size: 29px;
    color: var(--gold)
}

.countdown span {
    display: block;
    font-family: Cinzel, serif;
    font-size: 45px;
    line-height: 1.3;
    color: var(--burgundy);
    font-variant-numeric: tabular-nums
}

.countdown small {
    display: block;
    font-family: Cinzel, serif;
    font-size: 9px;
    letter-spacing: 1.3px
}

.calendar {
    margin-top: 12px
}

.family-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 65px;
    max-width: 750px;
    margin: auto
}

.family {
    text-align: center
}

.portrait {
    border: 1px solid var(--line);
    padding: 8px;
    border-radius: 180px 180px 4px 4px;
    margin-bottom: 28px;
    background: var(--paper)
}

.portrait img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 180px 180px 0 0;
    object-position: center
}

.family:first-child .portrait img {
    object-fit: contain;
    background: #ede8d7
}

.family h3 {
    font-family: Imperial, serif;
    font-size: 57px;
    color: var(--burgundy);
    line-height: 1.2;
    margin: 8px 0 19px
}

.family .relation {
    color: var(--gold);
    font-size: 14px;
    margin-top: 17px
}

.family p {
    font-size: 18px;
    line-height: 1.5
}

#WeddingEvents {
    background: #f5ead7
}

.timeline {
    position: relative;
    max-width: 730px;
    margin: auto
}

.timeline:before {
    content: '';
    position: absolute;
    left: 50%;
    top: 20px;
    bottom: 28px;
    width: 1px;
    background: var(--line)
}

.event {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    position: relative;
    align-items: center;
    padding: 20px 0 42px
}

.event:after {
    content: '';
    position: absolute;
    top: 55px;
    left: 50%;
    width: 7px;
    height: 7px;
    background: var(--gold);
    transform: translateX(-3px) rotate(45deg)
}

.event-art {
    display: flex;
    justify-content: flex-end
}

.event-art img {
    width: 135px;
    height: 145px;
    object-fit: contain
}

.event-copy {
    text-align: left
}

.event:nth-child(even) .event-art {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-start
}

.event:nth-child(even) .event-copy {
    grid-column: 1;
    grid-row: 1;
    text-align: right
}

.event-date {
    font-family: Cinzel, serif;
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 1px
}

.event h3 {
    font-size: 26px;
    color: var(--burgundy);
    line-height: 1.3;
    margin: 7px 0
}

.event time {
    font-size: 19px
}

.event-copy>p:not(.event-date) {
    font-size: 14px;
    margin-top: 8px
}
#WeddingEvents .event-location-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap:7px;
  margin-top: 14px;
  padding: 9px 16px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: transparent;
  background-color: var(--burgundy);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

#WeddingEvents .event-location-btn span {
  font: inherit;
  line-height: 1;
}

#WeddingEvents .event-location-btn:hover {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: #f5ead7;
}

#WeddingEvents .event-location-btn:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 4px;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 760px;
    margin: auto
}

.gallery-item {
    display: block;
    padding: 7px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 180px 180px 3px 3px;
    overflow: hidden;
    transition: transform .3s
}

.gallery-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: inherit
}

.gallery-item:first-child {
    grid-column: 1/-1;
    border-radius: 210px 210px 3px 3px
}

.gallery-item:first-child img {
    aspect-ratio: 3/2
}

.gallery-item:hover {
    transform: translateY(-4px)
}

.more-photos {
    max-width: 760px;
    margin: 30px auto 0;
    display: none;
}

.more-photos summary {
    cursor: pointer;
    text-align: center;
    font-size: 15px;
    color: var(--burgundy);
    padding: 14px
}

.extra-gallery {
    margin-top: 18px
}

.extra-gallery .gallery-item:first-child {
    grid-column: auto;
    border-radius: 180px 180px 3px 3px
}

.extra-gallery .gallery-item:first-child img {
    aspect-ratio: 4/5
}

.venues {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px
}

.venue {
    text-align: center;
    border: 1px solid var(--line);
    outline: 1px solid #d9bf8344;
    outline-offset: -5px;
    border-radius: 15px;
    padding: 35px 20px;
    background: #fff7e733;
    display: flex;
    align-items: center;
    flex-direction: column
}

.venue h3 {
    font-size: 25px;
    color: var(--burgundy);
    line-height: 1.3;
    margin: 18px 0 10px
}

.venue p {
    font-size: 16px;
    margin-bottom: 14px
}

.venue .CommonButton {
    margin-top: auto
}

.venue .SubTitle {
    font-size: 9px;
    letter-spacing: 1px
}

#WeddingFooter {
    padding: 105px 0 0;
    text-align: center;
    background-color: #f2e6cf;
    background-image: url("../images/wedding/footerbackground.png");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
}

#WeddingFooter h2 {
    font-family: Imperial, serif;
    font-size: 66px;
    margin-top: 80px !important;
    color: var(--burgundy);
    line-height: 1.2;
    margin: 18px 0
}

#WeddingFooter h2 span {
    color: var(--gold)
}

#WeddingFooter time {
    font-family: Cinzel, serif;
    font-size: 13px;
    letter-spacing: 2px
}

.footer-palace {
    margin: 40px auto 0;
    max-width: 850px;
    width: 100%
}

#musicToggle {
    position: fixed;
    bottom: 98px;
    right: 18px;
    z-index: 20;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: var(--burgundy);
    color: var(--paper);
    width: 48px;
    height: 48px;
    font-size: 25px;
    box-shadow: 0 4px 16px #0002
}

#musicToggle[aria-pressed=false]:after {
    content: '';
    position: absolute;
    width: 28px;
    height: 1px;
    background: var(--paper);
    transform: rotate(-45deg);
    top: 23px;
    left: 9px
}

dialog {
    max-width: 100vw;
    width: 100%;
    height: 100%;
    max-height: 100svh;
    background: transparent;
    border: 0;
    color: white;
    padding: 30px 65px;
    margin: auto
}

dialog::backdrop {
    background: #160e0beF
}

dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center
}

dialog figure {
    max-width: 1100px;
    width: 100%;
    text-align: center
}

dialog figure img {
    max-height: 82svh;
    width: 100%;
    object-fit: contain
}

dialog figcaption {
    font-size: 14px;
    padding: 10px
}

dialog button {
    position: absolute;
    background: #fff1;
    border: 1px solid #ffffff55;
    border-radius: 50%;
    color: white;
    width: 44px;
    height: 44px;
    font-size: 30px;
    line-height: 1
}

#closePhoto {
    right: 20px;
    top: 20px
}

#prevPhoto {
    left: 10px;
    top: 50%
}

#nextPhoto {
    right: 10px;
    top: 50%
}

.js-motion .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .8s ease, transform .8s ease
}

.js-motion .reveal.visible {
    opacity: 1;
    transform: none
}

@keyframes nudge {
    50% {
        transform: translateY(-5px)
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    *,
    *:before,
    *:after {
        animation: none !important;
        transition: none !important
    }

    .js-motion .reveal {
        opacity: 1;
        transform: none
    }
}
.hero-scroll span {
        display: block;
    font-family: Ovo, serif;
    margin-top: 10px;
    font-size: 50px;
    color: #5a0f1b;
    line-height: 1;
    animation: heroArrowFloat 1.8s ease-in-out infinite;
}

@keyframes heroArrowFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-scroll span {
        animation: none;
    }
}
/* Space for the fixed countdown */


#WeddingCountdown {
       position: fixed;
    left: 50%;
    bottom: 0;
    /* bottom: calc(12px + env(safe-area-inset-bottom, 0px)); */
    transform: translateX(-50%);
    z-index: 30;
    width: 100%;
    /* width: calc(100% - 32px); */
    /* max-width: 360px; */
    padding: 12px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 4px 20px #61483726;
    text-align: center;
}

#WeddingCountdown .countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

#WeddingCountdown .countdown > div:not(:last-child)::after {
    content: none;
}

#WeddingCountdown .countdown span {
    font-size: 28px;
    line-height: 1.2;
}

#WeddingCountdown .countdown small {
    margin-top: 4px;
    font-size: 8px;
    letter-spacing: 0.6px;
}

#WeddingCountdown #countdownMessage {
    margin-top: 6px;
    font-size: 13px;
}

/* Keep the timer hidden while the invitation opens */
body.opening-active #WeddingCountdown {
    display: none;
}
#WeddingCountdown .countdown > div {
    position: relative;
}

#WeddingCountdown .countdown > div:not(:last-child)::after {
    content: ":";
    position: absolute;
    top: 0;
    right: -9px;
    color: var(--gold);
    font-family: Cinzel, serif;
    font-size: 24px;
    line-height: 1.4;
}
#WeddingFamily .family .portrait--cutout {
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

#WeddingFamily .family .portrait--cutout img {
    display: block;
    width: 80%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center bottom;
    border-radius: 0;
    background: transparent;
}
.event-copy .event-location {
    display: inline;
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.event-copy .event-location:hover,
.event-copy .event-location:focus-visible {
    text-decoration: underline;
}