/*
---------------
CSS Reset https://www.joshwcomeau.com/css/custom-css-reset/
---------------
*/

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* 10. Create a root stacking context */
#root,
#__next {
  isolation: isolate;
}

/* I added the 3 below */

ul {
  padding-inline-start: 0;
}

li {
  list-style-type: none;
}

a {
  text-decoration: none;
  display: inline-block;
}

/*
---------------
Font size variables
---------------
*/

/* @link https://utopia.fyi/type/calculator?c=320,16,1.2,1728,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */
:root {
  /* Step -2: 11.1111px → 12.8px */
  --step--2: clamp(0.6944rem, 0.6705rem + 0.1199vw, 0.8rem);
  /* Step -1: 13.3333px → 16px */
  --step--1: clamp(0.8333rem, 0.7955rem + 0.1894vw, 1rem);
  /* Step 0: 16px → 20px */
  --step-0: clamp(1rem, 0.9432rem + 0.2841vw, 1.25rem);
  /* Step 1: 19.2px → 25px */
  --step-1: clamp(1.2rem, 1.1176rem + 0.4119vw, 1.5625rem);
  /* Step 2: 23.04px → 31.25px */
  --step-2: clamp(1.44rem, 1.3234rem + 0.5831vw, 1.9531rem);
  /* Step 3: 27.648px → 39.0625px */
  --step-3: clamp(1.728rem, 1.5659rem + 0.8107vw, 2.4414rem);
  /* Step 4: 33.1776px → 48.8281px */
  --step-4: clamp(2.0736rem, 1.8513rem + 1.1115vw, 3.0518rem);
  /* Step 5: 39.8131px → 61.0352px */
  --step-5: clamp(2.4883rem, 2.1869rem + 1.5072vw, 3.8147rem);
}

h1 {
  font-size: var(--step-5);
}

h2 {
  font-size: var(--step-2);
}

h3 {
  font-size: var(--step-1);
}

p,
a {
  font-size: var(--step-0);
}

footer a,
footer p {
  font-size: var(--step--2);
}

/*
---------------
Layout
---------------
*/

body {
  color: #101010;
  background-color: #f5f5f5;
  font-family: 'Oranienbaum', serif;
}

h1 {
  height: 10vh;
  padding: 0.5rem;
  align-content: center;
  text-align: center;

  font-family: 'Kapakana', cursive;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.slider {
  height: 100vh;
  width: 100%;
  position: relative;
}

.slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  animation: fade 9s ease-in-out infinite alternate;
}

.slider .slide-1 {
  animation-delay: 0s;
}

.slider .slide-2 {
  animation-delay: 3s;
}

.slider .slide-3 {
  animation-delay: 6s;
}

@keyframes fade {
  0% {
    opacity: 1;
  }

  33% {
    opacity: 0;
  }

  67% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.save-the-date {
  height: 400px;
  align-content: center;
  background-color: #101010;
}

.save-the-date p {
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: var(--step-5);
  text-align: center;
  color: #f5f5f5;
}

#confetti-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden; /* ensures confetti stays within the div */
}

#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* allows interaction with elements beneath the canvas */
}

.save-the-date p:nth-of-type(2) {
  font-family: 'Kapakana', cursive;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  text-align: center;
  place-items: center;
}

.grid-img-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

.wedding-info-link {
  padding: 0.25rem 1rem;
  border-radius: 5px;
  box-shadow: 0 0 5px #5c5c5c;
  color: #101010;
  font-weight: bold;
  transition: transform 0.3s ease-in-out;
}

.wedding-info-link:hover {
  transform: translateY(-3px);
}

.icon {
  width: 50px;
}

.locations,
.rsvp,
.hotels {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 1rem;
}

.church,
.reception,
.hotel-1,
.hotel-2 {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rsvp {
  gap: 1rem;
}

.rsvp p {
  max-width: 50ch;
}

.rsvp .icon {
  margin-top: 1rem;
}

.hotels h3 {
  font-weight: normal;
}

.countdown {
  height: 100vh;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;

  color: #f5f5f5;

  background-image:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(assets/imgs/DSC01159.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom;
}

.timebox {
  display: flex;
  gap: 1rem;
}

.countdown h2 {
  font-size: var(--step-5);
}

.countdown h3 {
  font-size: var(--step-4);
}

.countdown p {
  font-size: var(--step-1);
}

footer {
  padding: 1rem;
  text-align: center;
  color: #f5f5f5;
  background-color: #101010;
}

footer a {
  color: #f5f5f5;
}

footer a:hover {
  text-decoration: underline;
}
