:root {
  color-scheme: light dark;
  --beige: #e6ebe3;
  --grayge: #273534;

  --body-color: light-dark(var(--beige), var(--grayge));
  --panel-color: light-dark(var(--beige), var(--grayge));
  --text-color: light-dark(var(--grayge), var(--beige));
  --link-color: var(--text-color);
  --border-color: color-mix(in srgb, var(--panel-color), var(--body-color) 75%);

  --gradient-start: light-dark(#eae3d100, #2735349a);
  --gradient-end: light-dark(#eae3d1d8, #27353485);
  --nav-gradient-start: light-dark(#eae3d1f8, #273534e5);
  --shadow: light-dark(#5f2f1182, #222625e0);

  --opacity-light: 1;
  --opacity-dark: 0.5;
}

::backdrop {
  background-image: linear-gradient(45deg, var(--grayge), #222);
  opacity: 0.75;
}
dialog {
  background-color: white;
  border-color: black;
  padding: 0;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px,
    rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px,
    rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}
.dialog-close {
  background-color: var(--body-color);
  padding: 2rem;
}
* {
  box-sizing: border-box;
}

.hidden-sm {
  display: none !important;
}

body {
  font: 16px/1.5 system-ui, sans-serif;
  background-color: var(--body-color);
  background-color: light-dark(var(--beige), var(--grayge));
  color: var(--text-color);
  margin: 0;
  font-family: "Oranienbaum", serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.02em;
}
a {
  color: var(--text-color);
  text-decoration: underline;
  font-family: system-ui, sans-serif;
  font-weight: 300;
}
a.button {
  text-decoration: none;
  border: 1px solid var(--text-color);
  border-radius: 0.2em;
  padding: 0.5em;
  width: 100%;
  display: block;
  text-align: center;
  cursor: pointer;
}
a.button:hover,
a.button:focus {
  transform: translateY(-2px);
  box-shadow: 0 2px 0px currentColor;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: inherit;
}
img {
  max-width: 100%;
}
.meow-script-regular {
  font-family: "Meow Script", cursive;
  font-weight: 400;
  font-style: normal;
  text-decoration-thickness: from-font !important;
  text-underline-offset: 0.1em;
}
.oranienbaum-regular {
  font-family: "Oranienbaum", serif;
  font-weight: 400;
  font-style: normal;
}
.sans {
  font-family: system-ui, sans-serif;
}

/* https://css-tricks.com/linearly-scale-font-size-with-css-clamp-based-on-the-viewport/ */
h1 {
  font-size: clamp(3rem, 25vw, 12rem);
  line-height: 70%;
}
h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin-top: 0;
}
h3 {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
}
p:not(.footnote),
ul,
ol {
  font-size: clamp(1rem, 3vw, 1.5rem);
  max-width: 42ch;
  margin-inline: auto;
}
.right {
  text-align: right;
}
.center {
  text-align: center;
}
.no-wrap {
  white-space: nowrap;
}
.all-caps {
  font-size: 0.7em;
  text-transform: uppercase;
}
.large {
  font-size: 2em;
}
.actions,
.actions ul,
.actions li,
.actions p,
.actions a {
  font-family: system-ui, sans-serif;
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  max-width: 42ch;
  margin-inline: auto;
  padding: 0;
}
p.small {
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
}
a.small,
span.small {
  line-height: 1.25;
  font-size: 1rem;
  font-family: system-ui, sans-serif;
}
table {
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
}
tr:not(:last-child) td {
  /* border-bottom: 1px solid var(--text-color); */
}
td {
  vertical-align: top;
  padding-block: 1.2em;
  text-wrap: balance;
}
td:last-child:not(:only-child) {
  padding-inline-start: 1em;
}
main {
  background-image: linear-gradient(
      to bottom,
      var(--gradient-start),
      var(--gradient-end)
    ),
    url(./assets/img/inggrid-koe-kbKEuU-YEIw-unsplash.jpg);
  background-size: cover;
  background-position: 25%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#col main {
  padding-block-end: 8rem;
  background-image: linear-gradient(
      to bottom,
      var(--nav-gradient-start) 6rem,
      var(--gradient-start),
      var(--gradient-end)
    ),
    url(./assets/img/DSCF3684.jpg);
}

.wrapper,
.invite,
.location,
#actions {
  max-width: 1400px;
  margin-inline: auto;
}
.wrapper,
.invite,
.location {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh);
}
.invite,
.location {
  align-items: center;
  justify-content: center;
}
#side {
  flex-basis: 200px;
  padding-inline: 2rem;
}
#side h1 {
  padding-block: clamp(0.8rem, 3vw, 2rem);
}
h1 small {
  display: block;
  font-size: clamp(3rem, 25vw, 8rem);
  line-height: 70%;
}
#home h1 small,
#col h1 small {
  font-family: system-ui, sans-serif;
  font-weight: 200;
  text-transform: uppercase;
  font-size: max(12px, 0.2em);
  line-height: 170%;
}

#col h1 small {
  display: inline-block;
  margin-top: 1rem;
}

#col .dates {
  font-family: system-ui, sans-serif;
  text-transform: uppercase;
}

nav ul {
  max-width: unset;
  display: flex;
  justify-content: center;
  align-items: baseline;
  list-style: none;
  gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(0.8rem, 3vw, 2rem);
  margin: 0;
}

nav a {
  font-weight: 500;
  text-decoration: none;
}

nav a.active {
  text-decoration: underline;
}

nav a:hover,
nav a:focus {
  text-decoration: underline;
}

nav.internal ul {
  justify-content: center;
  gap: clamp(0.8rem, 5vw, 4rem);
}

nav svg {
  width: 4rem;
  height: auto;
  vertical-align: middle;
}

.polaroid,
.invite,
.location {
  background-color: var(--panel-color);
  padding: clamp(0.8rem, 2vw, 1.2rem);
  box-shadow: 0 10px 50px var(--shadow);
  max-width: 40rem;
}

.invite,
.location {
  padding: 0;
  margin: 4rem auto;
}

.location {
  max-width: 56rem;
}

.card {
  max-width: fit-content;
  padding: 1rem 4.2rem;
  padding-inline: clamp(1rem, 10vw, 4rem);
}

.card h1 {
  margin-block: 0 4rem;
  font-size: clamp(2rem, 20vw, 8rem);
}

.sketch {
  max-width: 100%;
  mix-blend-mode: darken;
}

.location h1 {
  margin-block: 0.25em;
}

.location .sans > p,
.location .sans > ul {
  font: 16px/1.5 system-ui, sans-serif;
  max-width: none;
}

/* Change blend mode based of prefers color scheme */
@media (prefers-color-scheme: dark) {
  .sketch {
    mix-blend-mode: screen;
    filter: invert(1);
  }
}

.polaroid img {
  width: 100%;
  aspect-ratio: 0.75;
  object-fit: cover;
}

#polaroid {
  background-color: var(--panel-color);
  padding: clamp(0.8rem, 3vw, 2rem);
  max-width: 32rem;
  margin-inline: auto;
}
#polaroid figcaption p {
  font-size: clamp(0.8rem, 3vw, 1.1rem);
  max-width: unset;
}
#polaroid img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}
#intro {
  flex-grow: 1;
  flex-basis: 50%;
  padding: 2rem;
}
#images {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

#images svg {
  width: 150%;
  position: absolute;
  top: -8rem;
  opacity: 0.5;
}

#slider {
  padding: 6rem 2rem 4rem 2rem;
  display: flex;
  overflow-x: auto;
  gap: 2rem;
  position: relative;
  z-index: 10;

  scrollbar-color: var(--text-color) var(--body-color);
  scrollbar-width: thin;
}
#slider figure {
  flex: 1 0 75%;
  margin: 0;
  /* animation: fade-in linear;
  animation-timeline: view(0, 50vh); */
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#actions {
  padding: 4rem 2rem;
  display: flex;
  justify-content: space-around;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2rem;
  overflow: hidden;
}
#actions p {
  font: 16px/1.5 system-ui, sans-serif;
}
#actions svg {
  margin-top: 4rem;
  scale: 2;
}

@media only screen and (min-width: 1000px) and (min-height: 500px) {
  .hidden-lg {
    display: none !important;
  }
  .hidden-sm {
    display: block !important;
  }

  .wrapper {
    flex-direction: row-reverse;
  }
  #intro h1 {
    padding-block: 20dvh;
  }
  #intro p {
    margin-bottom: 10dvh;
  }
  #side {
    flex-grow: 1;
    flex-basis: 50%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
  }
  #polaroid {
    max-height: min(calc(100% - 4rem), 75dvh);
    max-width: 100%;
    aspect-ratio: 0.6666666667;
  }
  #polaroid img {
    max-height: 100%;
  }
  #images {
    overflow: visible;
  }
  #images h2 {
    font-size: clamp(0.8rem, 25vw, 10rem);
  }
  #images .polaroid {
    max-width: 24rem;
  }
  #slider {
    padding-inline: 10dvw;
  }

  #actions svg {
    scale: 1;
  }
}
