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

/* Prevent horizontal scrolling */
html {
  overflow-x: hidden;
  overscroll-behavior-x: none;
  scroll-behavior: smooth;
}

/* Ensure media don't overflow the viewport */
img,
picture,
video,
svg,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout: body full-width and sections full-height except last */
body {
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-align: center;
  background-color: var(--color-primary);
}

.cont-100vh {
  height: 100svh;
}

.cont-80svh {
  height: 80svh;
}

/* Variables */
:root {
  --color-primary: #fef568;
  --color-secondary: #40301e;
  --color-accent: #86a1b2;

  --font-cursive: "Pinyon Script", cursive;
  --font-sans: "Josefin Sans", sans-serif;

  --font-sans-italic-style: italic;
  --font-sans-light-weight: 300;
  --font-sans-bold-weight: 700;
}

/* Typography */

h1 {
  font-family: "Pinyon Script", cursive;
  line-height: 0.8;
  font-size: 5rem;
}

h3,
h4,
h5,
h6,
p,
span {
  font-family: "Josefin Sans", sans-serif;
  line-height: 1.1;
  text-transform: uppercase;
}

p {
  font-size: 1rem;
}

h2 {
  font-family: "Pinyon Script", cursive;
  font-size: 2.5rem;
  line-height: 0.8;
}

li {
  font-family: "Josefin Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  text-transform: uppercase;
}

.bold {
  font-weight: var(--font-sans-bold-weight);
}

a {
  color: var(--color-secondary);
}

a,
a:active,
a:focus,
a:visited {
  -webkit-tap-highlight-color: transparent;
  -webkit-tap-highlight-color: var(--color-secondary);
}

/* BUTTON */
button {
  font-family: "Josefin Sans", sans-serif;
  font-size: 1.5rem;
  text-transform: uppercase;
  padding: 1rem 1.5rem;
  background-color: var(--color-primary);
  border: none;
  border-radius: 2rem;
}

button:hover {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  cursor: pointer;
}

/* BG COLOR */
.bg-primary {
  background-color: var(--color-primary);
}
.bg-accent {
  background-color: var(--color-accent);
}

/* PADDING */
.padding-lr-32 {
  padding-left: 32px;
  padding-right: 32px;
}

.padding-lr-28 {
  padding-left: 28px;
  padding-right: 28px;
}

.padding-tb-32 {
  padding-top: 32px;
  padding-bottom: 32px;
}

.padding-tb-8 {
  padding-top: 8px;
  padding-bottom: 8px;
}

.padding-tb-16 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.padding-tb-32 {
  padding-top: 32px;
  padding-bottom: 32px;
}

.padding-tb-64 {
  padding-top: 64px;
  padding-bottom: 6px;
}

/* GAPS */
.gap-32 {
  gap: 32px;
}

/* Custom styles for the wedding website */
.font-size-1rem {
  font-size: 1rem;
}

.bold {
  font-weight: var(--font-sans-bold-weight);
}

.italic {
  font-style: var(--font-sans-italic-style);
}
.light {
  font-weight: var(--font-sans-light-weight);
}

.text-center {
  text-align: center;
}

svg {
  max-width: 100%;
  height: auto;
}

/* ----- HEADER ----- */
header.cont-100vh {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;

  .date-info {
    font-size: 1.5rem;
    font-weight: 400;
  }
}

header.cont-100vh video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

header.cont-100vh > div:first-of-type {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  pointer-events: auto;
}

header.cont-100vh > div:last-of-type {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 2;
  color: var(--color-primary);
}

header.cont-100vh svg,
header.cont-100vh p,
header.cont-100vh h3 {
  color: var(--color-primary);
}

/* ----- INTRO SECTION ----- */
.intro-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  align-self: stretch;
  width: 100%;
  height: 55svh;
  font-style: italic;
  padding-bottom: 16px;

  div {
    padding: 1.4rem 1rem;
    border: 1px solid var(--color-secondary);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    img {
      padding: 1rem;
      width: 100%;
      max-width: 180px;
      height: auto;
    }
  }

  span {
    font-weight: 600;
  }
}

/* ----- 1º SECTION / INFO  ----- */
.info-section {
  display: flex;
  padding: 4rem 16px;
  justify-content: space-between;
  align-items: center;
  align-self: center;
  width: 100%;
  height: 100svh;

  .info-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.8rem;
  }

  .diagonal-text {
    font-size: 3rem;
  }
}

/* ----- 2º SECTION / DRESSCODE ----- */
.dresscode-section {
  background-color: var(--color-accent);
  color: var(--color-primary);

  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  gap: 32px;
  height: 70svh;
  padding-bottom: 16px;

  border-radius: 18px 18px 0 0;

  position: sticky;
  top: 0;

  .title-dresscode {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 4rem;
  }

  .info-dresscode {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  i {
    font-style: italic;
  }
}

/* ----- 3º SECTION / MENU ----- */
.menu-section {
  color: var(--color-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  align-self: center;
  padding-top: 32px;
  padding-bottom: 32px;
  background-color: var(--color-accent);

  .diagonal-text {
    padding-top: 2rem;
    padding-bottom: 4.2rem;
  }

  h3 {
    font-weight: var(--font-sans-bold-weight);
  }

  .menu-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--color-primary);
    border-radius: 0.5rem;
    padding: 2rem;

    .menu-elements {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
  }

  .menu-pay {
    font-size: 1.2rem;
  }

  button {
    font-weight: var(--font-sans-bold-weight);
    font-size: 20px;
  }
}

/* ----- 4º SECTION / THANKS ----- */
.thanks-section {
  background-color: var(--color-primary);
  color: var(--color-secondary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: center;
  padding: 0 16px;
  width: 100%;
  height: 600px;

  border-radius: 18px 18px 0 0;

  .diagonal-text {
    font-size: 5rem;
    padding-bottom: 5rem;
  }

  .closing-text {
    font-size: 1rem;
    max-width: 600px;
  }
}

/* ----- FOOTER ----- */
footer {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  align-self: stretch;
  padding: 16px 32px;

  .img-closing-container {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .logo-brown-svg {
    display: flex;
    justify-content: center;
  }

  svg {
    width: 80%;
  }

  img {
    width: 45%;
    max-width: 400px;
    height: auto;
    mix-blend-mode: multiply;
    object-position: center;
  }

  p {
    font-size: 0.8rem;
    color: var(--color-secondary);
  }
}

/* Diagonal text utility */
.diagonal-text {
  text-align: center;
  font-feature-settings: "dlig" on;
  font-family: "Pinyon Script";
  font-size: 80px;
  font-style: normal;
  font-weight: 400;
  line-height: 70%; /* 51.2px */

  display: inline-block;
  transform: rotate(-15deg);
  transform-origin: center center;
  will-change: transform;
  max-width: 100%;
}

/* ----- MAP EMBED ----- */
.map-embed {
  width: 90%;
  overflow: hidden;
  height: 220px;
  border: 1px solid #40301e;
  border-radius: 1rem;
  iframe {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
  }
}

/* ----- TEXT CLOSING ----- */
.text-closing {
  font-size: 1.5rem;
  font-weight: var(--font-sans-bold-weight);
}

/* Connie & Sergio image pendulum (soft 2D rotate) */
.img-closing-container {
  img.connie-sergio-img {
    transform-origin: center top;
    will-change: transform;
    animation: pendulum-2d 5s steps(10) infinite;
  }
}

@keyframes pendulum-2d {
  0% {
    transform: rotate(8deg);
  }
  50% {
    transform: rotate(-8deg);
  }
  100% {
    transform: rotate(8deg);
  }
}
