/* abril-fatface-latin-400-normal */
@font-face {
  font-family: "Abril Fatface";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/abril-fatface@latest/latin-400-normal.woff2)
      format("woff2"),
    url(https://cdn.jsdelivr.net/fontsource/fonts/abril-fatface@latest/latin-400-normal.woff)
      format("woff");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ibarra-real-nova-latin-wght-normal */
@font-face {
  font-family: "Ibarra Real Nova";
  font-style: normal;
  font-display: swap;
  font-weight: 500 700;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/ibarra-real-nova:vf@latest/latin-wght-normal.woff2)
    format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Ibarra Real Nova";
  font-style: italic;
  font-display: swap;
  font-weight: 500 700;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/ibarra-real-nova:vf@latest/latin-wght-italic.woff2)
    format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ff-display: "Abril Fatface", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --ff-serif: "Ibarra Real Nova", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --ff-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  font-size: 20px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: var(--ff-serif);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  font-family: var(--ff-display);
}

#root,
#__next {
  isolation: isolate;
}

.br {
  display: block;
  margin-bottom: 0.5rem;
}

.language-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.reverse .language-toggle {
  right: auto;
  left: 20px;
}

.lang-btn {
  background: transparent;
  border: 1px solid;
  font-family: var(--ff-sans);
  border-radius: 1.5rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--color-d);
  border-color: var(--color-d);
}

.page {
  position: relative;
  display: flex;
  min-height: var(--svh);
  background-color: var(--color-l);
  color: var(--color-d);
}

.page h1 {
  margin-top: 2rem;
  font-size: 3rem;
  color: var(--color-m);
}

.page.reverse {
  flex-direction: row-reverse;
}

.scroll-icon {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 3rem;
  bottom: 40px;
  color: var(--color-m);
  cursor: pointer;
}

.scroll-icon::after {
  margin-top: -0.3rem;
  content: "\261F";
}

.s-hidden {
  display: none;
}

.m-hidden {
  display: block;
}

.intro {
  --color-l: #fffbf2;
  --color-m: #f98866;
  --color-d: #962604;
}

.intro h1 {
  margin-top: 0;
  font-size: 2.5rem;
}

.intro .photo-section {
  flex: 1;
  min-height: var(--svh);
}

.intro .photo-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro .content-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.intro .subtitle {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.intro .date {
  font-size: 1.25rem;
  letter-spacing: 1px;
}

.schedule {
  --color-l: oklch(96.9% 0.016 293.756);
  --color-m: #8a4a94;
  --color-d: #582f5e;

  flex-direction: column;
  align-items: center;
}

.schedule-events {
  padding: 2rem 1rem 3rem 1rem;
  display: flex;
  justify-content: space-evenly;
}

.schedule-events .event {
  position: relative;
  display: flex;
  flex: 1 0 0;
  padding: 0 2rem;
  flex-direction: column;
  align-items: center;
}

.schedule-events .event:not(:last-of-type)::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 10%,
    var(--color-m) 10%,
    var(--color-m) 90%,
    transparent 90%,
    transparent 100%
  );
}

.schedule-events .event .number {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--ff-display);
  padding: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--color-m);
  color: white;
  font-size: 1.25rem;
}

.schedule-events .event h2 {
  margin: 1rem 0;
}

.schedule-events .event p {
  flex: 1 0 0;
  margin-bottom: 1rem;
}

.schedule-events .event iframe {
  border: 0;
  width: 100%;
  height: 10rem;
}

.rsvp {
  --color-l: rgb(241, 254, 255);
  --color-m: rgb(0, 155, 204);
  --color-d: rgb(0, 99, 130);

  flex-direction: column;
  align-items: center;
  padding-bottom: 0.5rem;
}

.save {
  position: absolute;
  padding: 1rem;
  top: 0;
  bottom: auto;
  left: 0;
  z-index: 90;
  opacity: 0;
  transition: all 0.1s;
}

.mounted {
  transform: scale(0);
}

.visible {
  transform: scale(1);
  opacity: 1;
}

.save.fixed {
  position: fixed;
}

.save.bottom {
  top: auto;
  bottom: 0;
}

.save button {
  font-family: var(--ff-sans);
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.5rem 0;
  margin: 0 auto;
  width: 6rem;
  border: 0;
  color: white;
  background: #007ff0;
  border-radius: 0.35rem;
  box-shadow: 0.5px 1px 1px hsl(220deg 60% 50% / 0.7);
  transition: all 0.1s;
  cursor: pointer;
}

.save.saving button {
  width: 7rem;
}

.save.saved button {
  width: 6.5rem;
  background: #00ba63;
  box-shadow: 0.5px 1px 1px hsla(146.3, 100%, 20.6%, 0.7);
}

.save button .save-state {
  display: none;
}

.save.initial button .initial {
  display: inline;
}

.save.saving button .saving {
  display: inline;
}

.save.saved button .saved {
  display: inline;
}

div.save svg {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
}

.saving svg {
  margin-right: 0.5rem;
  margin-bottom: -0.25rem;
  animation: spin 1s linear infinite;
}

.saved svg {
  margin-right: 0.2rem;
  margin-bottom: -0.2rem;
}

.save polyline {
  stroke-dasharray: 23;
  stroke-dashoffset: -23;
}

.saved button polyline {
  animation: check 0.5s forwards;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes check {
  to {
    stroke-dashoffset: 0;
  }
}

.save.initial button:hover {
  background: #148ffb;
}

.save.initial button:active {
  background: #0074da;
}

.rsvp h1 {
  margin-bottom: 1rem;
}

.rsvp .subtitle {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
}

.rsvp-main {
  display: flex;
  justify-content: center;
  column-gap: 2rem;
  width: 100%;
  padding: 0 2rem 1.5rem;
}

.rsvp-main .guests {
  flex: 2;
  display: flex;
  flex-wrap: wrap;
  column-gap: 2rem;
}

.rsvp-main .extras {
  flex: 1;
}

.rsvp-main .shrink {
  flex: 1;
  max-width: 25rem;
}

.rsvp-main .shrink + .extras {
  max-width: 25rem;
}

.guest {
  flex: 1 1 calc(50% - 2rem);
}

.guest h2 {
  text-align: center;
  font-family: var(--ff-serif);
  margin-bottom: 1.5rem;
}

.rsvp-main .selector-wrapper {
  border: 1px solid;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.rsvp-main h3 {
  position: absolute;
  transform: translateY(calc(-100% - 0.2rem));
  font-size: 0.8rem;
  font-weight: normal;
  background: var(--color-l);
  padding: 0 0.1rem;
  font-family: var(--ff-sans);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.selector {
  display: flex;
}

.selector label {
  flex: 1 0 0;
}

.selector label span {
  display: block;
  border: 1px solid;
  border-radius: 0.3rem;
  padding: 0.25rem;
  text-align: center;
  font-family: var(--ff-sans);
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.8rem;
  cursor: pointer;
}

.selector label:first-child {
  margin-right: 0.75rem;
}

.selector input[value="yes"]:checked + span {
  background: oklch(96.2% 0.044 156.743);
  border-color: oklch(52.7% 0.154 150.069);
  color: oklch(52.7% 0.154 150.069);
}

.selector input[value="no"]:checked + span {
  background: oklch(87.2% 0.01 258.338);
  border-color: oklch(44.6% 0.03 256.802);
  color: oklch(44.6% 0.03 256.802);
}

.selector input {
  position: absolute;
  opacity: 0;
}

.rsvp .extras p,
.rsvp .plus-one p {
  margin-bottom: 1.24rem;
  font-size: 1.2rem;
  line-height: 2.5rem;
  text-align: center;
}

.rsvp .extras textarea {
  width: 100%;
  height: 10rem;
  padding: 0.5rem;
  border: 1px solid var(--color-d);
}

.help {
  --color-l: oklch(97.9% 0.021 166.113);
  --color-m: oklch(50.8% 0.118 165.612);
  --color-d: oklch(44.8% 0.119 151.328);

  flex-direction: column;
  align-items: center;
  padding-bottom: 1rem;
}

.help h1 {
  margin-bottom: 2rem;
}

.help .questions {
  display: flex;
  padding: 0 2rem;
  column-gap: 2rem;
}

.help .question-col {
  flex: 1 0 0;
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}

.question h2 {
  font-family: var(--ff-sans);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  color: var(--color-m);
}

.interstitial {
  background: rgb(32, 50, 80);
  padding: 1.5rem;
}

.interstitial p {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.4rem;
  font-style: italic;
  color: white;
}

.story .photo-section,
.story .content-section {
  flex: 1;
  height: var(--svh);
}

.story img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sardinia {
  --color-l: rgb(255, 245, 227);
  --color-d: rgb(96, 39, 197);
}

.lisbon {
  --color-l: rgb(222, 255, 239);
  --color-d: rgb(214, 14, 136);
}

.boston {
  --color-l: rgb(252, 233, 255);
  --color-d: rgb(79, 38, 1);
}

.rome {
  --color-l: rgb(222, 241, 255);
  --color-d: rgb(4, 112, 0);
}

.albania {
  --color-l: rgb(255, 242, 170);
  --color-d: rgb(215, 0, 0);
}

.engaged {
  --color-l: rgb(25, 82, 45);
  --color-d: rgb(240, 255, 206);
}

.party .content-section {
  background: linear-gradient(
    to bottom right,
    #ffb3ba,
    #ffdfba,
    #ffffba,
    #baffc9,
    #bae1ff,
    #d4baff,
    #ffb3e6
  );
}

.photo-series {
  position: relative;
  overflow: hidden;
}

.photo-series img {
  position: absolute;
  inset: 0;
  opacity: 0;
  object-position: var(--start-pos, 0%) center;
  animation: crossfade-pan 28s infinite;
}

.photo-series img:nth-child(1) {
  animation-delay: 0s;
  --start-pos: 20%;
  --end-pos: 80%;
}
.photo-series img:nth-child(2) {
  animation-delay: 7s;
  --start-pos: 10%;
  --end-pos: 75%;
}
.photo-series img:nth-child(3) {
  animation-delay: 14s;
  --start-pos: 20%;
  --end-pos: 80%;
}
.photo-series img:nth-child(4) {
  animation-delay: 21s;
  --start-pos: 10%;
  --end-pos: 100%;
}

@keyframes crossfade-pan {
  0% {
    opacity: 0;
    object-position: var(--start-pos) center;
  }
  5% {
    opacity: 1;
    object-position: var(--start-pos) center;
  }
  25% {
    opacity: 1;
    object-position: var(--end-pos) center;
  }
  30% {
    opacity: 0;
    object-position: var(--end-pos) center;
  }
  100% {
    opacity: 0;
    object-position: var(--end-pos) center;
  }
}

.story .content-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.story p {
  font-size: 1.3rem;
  max-width: 25rem;
}

.error {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
}

.error img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: invert();
}

.error h1 {
  position: relative;
  text-align: center;
  max-width: 50rem;
  padding: 3.5rem 4rem;
  margin-top: 17rem;
  font-family: var(--ff-sans);
  color: white;
  z-index: 3;
}

.error h1::before {
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: #112035d1;
  filter: blur(3rem);
}

@media (max-width: 768px) {
  html {
    font-size: 24px;
  }

  .s-hidden {
    display: block;
  }

  .m-hidden {
    display: none;
  }

  .page {
    flex-direction: column;
    justify-content: center;
    position: relative;
  }

  .page h1 {
    font-size: 2rem;
  }

  .scroll-icon {
    border: 1px solid;
    font-size: 1rem;
    width: 2rem;
    height: 2rem;
    bottom: 20px;
    padding-top: 0.5rem;
    border-radius: 50%;
    color: var(--color-m);
    border-color: var(--color-l);
    align-self: center;
  }

  .language-toggle {
    top: 0.5rem;
    right: 0.5rem;
  }

  .lang-btn {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
    padding: 0;
  }

  .intro .photo-section {
    position: absolute;
    width: 100%;
    height: var(--svh);
    z-index: 1;
  }

  .intro .content-section {
    z-index: 2;
    color: var(--color-l);
  }

  .intro .content-section .text {
    position: relative;
    padding: 0 1rem 1rem 1rem;
    transform: translateY(50%);
  }

  .intro .text::after {
    display: block;
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 9, 0, 0.8);
    z-index: -1;
    filter: blur(2rem);
  }

  .intro h1 {
    font-size: 1.4rem;
    color: var(--color-l);
  }

  .intro h1 span {
    color: var(--color-m);
  }

  .intro .lang-btn {
    color: var(--color-l);
    border-color: var(--color-l);
  }

  .schedule .schedule-events {
    flex-direction: column;
    padding: 2rem 0 0;
  }

  .schedule .event {
    padding: 0;
  }

  .schedule .event p {
    padding: 0 1rem;
  }

  .schedule-events .event:not(:last-of-type)::after {
    display: none;
  }

  .schedule .event {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }

  .rsvp-main {
    flex-direction: column;
    padding: 0 1rem 3.5rem;
  }

  .rsvp .subtitle {
    font-size: 1rem;
    text-align: center;
    padding: 0 1rem;
  }

  .rsvp .guests {
    flex-direction: column;
    flex-wrap: nowrap;
    column-gap: 0;
    margin-right: 0;
  }

  .rsvp-main .shrink {
    max-width: unset;
  }

  .rsvp-main .shrink + .extras {
    max-width: unset;
  }

  .rsvp-main .extras p {
    line-height: 1.25;
  }

  .help {
    justify-content: flex-start;
    padding-bottom: 3rem;
  }

  .help .questions {
    padding: 0 1rem;
    flex-direction: column;
    gap: 2rem;
  }

  .help .question-col {
    row-gap: 2rem;
  }

  .question h2 {
    font-size: 0.9rem;
  }

  .interstitial {
    padding: 0.5rem;
  }

  .interstitial p {
    font-size: 1.1rem;
  }

  .story.page {
    display: block;
    color: white;
    height: calc(var(--svh) * 6);
  }

  .story .photo-section {
    height: calc(var(--svh) * 1.3);
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .story .content-section {
    position: sticky;
    top: 50vh;
    transform: translateY(-50%);
    margin-top: calc(var(--svh) * 2);
    z-index: 2;
  }

  .story .content-section p {
    background: rgba(18, 18, 32, 0.75);
    padding: 1rem;
    font-size: 1rem;
  }

  .party .content-section {
    background: unset;
  }

  .story .lang-btn {
    position: sticky;
    top: 1rem;
    z-index: 2;
    color: white;
    border-color: white;
  }

  .reverse .language-toggle {
    right: 0.5rem;
    left: auto;
  }

  .sardinia img {
    object-position: 35% 50%;
  }

  .lisbon img {
    object-position: 40% 50%;
  }

  .rome img {
    object-position: 45% 50%;
  }

  .albania img {
    object-position: 40% 50%;
  }

  .engaged img {
    object-position: 55% 50%;
  }
}
