html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  overflow: hidden;
}

main {
  scroll-snap-type: y mandatory; 
  overflow-y: scroll;
  height: 100vh;
}

/* header */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(200, 100, 200, 0.4);
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header nav ul {
  display: flex;
  justify-content: space-evenly;
  padding: 10px 0;
  list-style: none;
  margin: 0;
}

header nav ul li a {
  text-decoration: none;
  color: black;
  padding: 5px 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(0,0,0,0);
  border-radius: 5px;

  background-color: rgba(0,0,0,0);
  text-align: center;
}

header nav ul li a:not(.active):hover {
  color: white;
  border: 1px solid white;
}

header nav ul {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

header nav ul li a span {
  display: none;
}

header nav ul li a.active span {
  /*display: inline;*/
}

header nav ul li a.active {
  color: white;
  background: darkmagenta;
}

@media (max-width: 320px) {
  header nav ul {
    flex-wrap: wrap;
  }
}

@media (min-width: 768px) {
  header nav ul {
    flex-wrap: wrap;
  }
  
  header nav ul li a span {
    display: inline;
  }
}

/* sections */

section {
  scroll-snap-align: start;
  scroll-snap-stop: always; 
  min-height: 100vh;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

section h1 {
  font-size: xx-large;
  font-style: italic;
  color: #702963;
}

#wedding {
  height: 100vh;
  max-height: 100vh;
  background: url("assets/bg.jpg") no-repeat fixed;
  background-position: 70% 30%; 
  background-size: cover;
  overflow: hidden;
}

#venue {
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  z-index: 1;
}

#venue img {
  max-width: 100%;
}

#venue .flexContainer {
  flex-wrap: wrap;
  flex-direction: column;
}

#venue div.flex {
  background-color: #E8D6D2;
  border: 1px solid gray;
  color: black;
}

#venue h2 {
  margin-top: 0;
}

#map {
  padding: 0;
}

#housing {
  background: white;
}

#housing .flex {
  min-width: 350px;
}

#housing img {
  max-width: 80%;
}

#info {
  background: #ced6e0;
}

#toastmasters {
  background-color: rgba(242, 216, 237, 0.8);
  padding: 20px;
}

#toastmasters img {
  max-width: 90%;
  border-radius: 30px;
}

@media (max-width: 400px) {
  #housing .flexContainer {
    flex-wrap: wrap;
    flex-direction: column;
    margin-bottom: 50vh;
  }

  #housing .flexContainer .flex {
    scroll-snap-align: center;
  }
}

@media (min-width: 768px) {
  #housing {
    padding-left: 50px;
    padding-right: 50px;
  }

  #toastmasters img {
    max-width: 500px;
  }
}

#photos {
  background: #949d9c;
  color: white;
  min-height: 0;
  padding: 50px;
}

#photos .box {
  opacity: 25%;
  border: 1px solid black;
  border-radius: 10px;
  padding: 20px;
}

#music {
  background: #57606f;
  color: white;
}

#rsvp {
  background: url("assets/osa.jpg");
  background-repeat: repeat-x;
  background-position: bottom;
  background-attachment: fixed;
  background-color: #E8D6D2;
  height: 70vh;

  justify-content: flex-start;
}

#rsvp h1 {
  margin-top: 20vh;
}

section#end {
  height: 10px;
  min-height: 10px;
  background-color: black;
}

div.narrow {
  max-width: 800px;
}

div.border {
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 20px;
}

#photo img {
    max-width: 50%;
}


/* animations */

#wedding .banner.fade-in {
  background-color: rgba(200, 100, 200, 0.4);
}

#wedding .banner {
  opacity: 1;
  background-color: transparent;
  padding: 10px;
  transition: background-color 2s ease-in-out;

  rotate: -15deg;
  width: 300%;
  margin: 0;
  margin-top: 35vh;

  color: white;
  font-size: 13vw;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

@media (min-width: 768px) {
  #wedding .banner {
    font-size: 100px;
  }
}

/* shared */

a {
  color: rgba(0, 0, 100);
  background-color: rgba(255, 255, 255, 0.25);
  padding: 0 5px;
  text-align: center;
  border-radius: 5px;
  font-weight: bold;
}

a:visited {
  color: rgba(0, 0, 100);
}

a:hover {
  color: rgba(100, 100, 200, 0.7);
}

.left {
  text-align: left;
}

.bottom {
  position: relative;
  bottom: 10px;
}

.margin-top {
  margin-top: 30px;
}

.flexContainer {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory; 
  gap: 16px; 
  max-width: 100%;
}

.flex {
  flex: 0 0 80%; 
  border: 0;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(200, 100, 200, 0.4);
  border-radius: 15px;
}

.subFlexContainer {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  padding-left: 0;
  gap: 10px;
}

.subFlex {
  flex: 1;
}

.subFlexLarge {
  flex: 2;
}

@media (min-width: 768px) {
  .flexContainer {
    /*flex-wrap: wrap;
    overflow: visible;*/
    gap: 24px; 
    justify-content: space-between; 
  }

  .flex {
    flex: 1; 
  }
}

/* scroll */

.hidden {
  visibility: hidden !important;
}

.dot-container {
  text-align: center;
  padding: 20px;
  /*background: #ddd;*/
  margin-top: 10px;
  margin-bottom: 10px;
}

.dot {
  height: 25px;
  width: 25px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.dot.active {
  background-color: #902993;
}

/* Fireworks */

@keyframes firework {
  0% { 
    transform: translate(-50%, 60vh);
    width: 0.5vmin;
    opacity: 1;
  }
  50% { 
    width: 0.5vmin;
    opacity: 1;
  }
  100% { 
    width: 45vmin; 
    opacity: 0; 
  }
}

.firework,
.firework::before,
.firework::after {
  --top: 60vh;
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.5vmin;
  aspect-ratio: 1;
  background:
    /* random backgrounds */
    radial-gradient(circle, #ff0 0.2vmin, #0000 0) 50% 00%,
    radial-gradient(circle, #ff0 0.3vmin, #0000 0) 00% 50%,
    radial-gradient(circle, #ff0 0.5vmin, #0000 0) 50% 99%,
    radial-gradient(circle, #ff0 0.2vmin, #0000 0) 99% 50%,
    radial-gradient(circle, #ff0 0.3vmin, #0000 0) 80% 90%,
    radial-gradient(circle, #ff0 0.5vmin, #0000 0) 95% 90%,
    radial-gradient(circle, #ff0 0.5vmin, #0000 0) 10% 60%,
    radial-gradient(circle, #ff0 0.2vmin, #0000 0) 31% 80%,
    radial-gradient(circle, #ff0 0.3vmin, #0000 0) 80% 10%,
    radial-gradient(circle, #ff0 0.2vmin, #0000 0) 90% 23%,
    radial-gradient(circle, #ff0 0.3vmin, #0000 0) 45% 20%,
    radial-gradient(circle, #ff0 0.5vmin, #0000 0) 13% 24%
    ;
  background-size: 0.5vmin 0.5vmin;
  background-repeat: no-repeat;
  animation: firework 3s infinite;
}

.firework::before {
  transform: translate(-50%, -50%) rotate(25deg) !important; 
}

.firework::after {
  transform: translate(-50%, -50%) rotate(-37deg) !important;
} 
