@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

:root {
  --color-text: #163c3d;
  --color-text-light: hsla(182, 47%, 16%, 60%);
  --color-primary: #98e8ea;
  --color-clickable: #c40091;

  --nav-height: 96px;

  --border-radius: 36px;
}

body {
  font-size: 16px;
  color: var(--color-text);
  background-color: white;
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  padding: 0;
  margin: 0;
  scroll-behavior: smooth;
  /* font weight normalization */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

img,
picture {
  display: block;
  width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text);
}

p {
  color: var(--color-text);
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

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

[id] {
  scroll-margin-top: var(--nav-height);
}

/* Typography */
h2 {
  font-size: 52px;
  line-height: 1;
  font-weight: 800;
  color: var(--color-text);
  margin-block: 0.25em;
}
h3 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--color-text);
  margin-block: 0.333em;
}
h4 {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: var(--color-text);
  margin-block: 0.333em;
}

p {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--color-text);
  margin-block: 0.333em 1em;
}

/* BUTTONS */

.button,
#field_submit input {
  display: inline-block;
  background-color: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  padding: 0.666rem 2rem;
  border-radius: 100vw;
  text-decoration: none;
  transition: background-color 0.3s ease;
  font-weight: 700;
  line-height: 1;
  text-align: center;
	font-size: 16px;
  &:hover,
  &:focus {
    background-color: var(--color-primary);
  }
  &:visited {
    color: var(--color-text);
  }
}

a.button--dark {
  background-color: var(--color-text);
  color: white;
  border: none;
  &:hover,
  &:focus {
    background-color: var(--color-text-light) !important;
    color: white !important;
  }
  &:visited {
    color: white !important;
  }
}

a.button-rsvp,
#field_submit input {
  text-transform: uppercase;
  background-color: var(--color-clickable);
  color: white;
  border-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5ch;
  transition: opacity 0.2s ease;
	font-size: 18px;
  &:hover,
  &:focus {
    background-color: var(--color-text);
  }
  &:visited {
    color: white;
  }
}
a.button-rsvp span.arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  transform: translateY(-1px);
  width: 15px;
  height: 17px;
}
a.button-rsvp:hover span.arrow,
a.button-rsvp:focus span.arrow {
  transform: translateY(1px);
}
a.button-rsvp[data-rsvp-scroll="after"] span.arrow {
  transform: rotate(180deg);
}
a.button-rsvp[data-rsvp-scroll="before"] span.arrow {
  transform: rotate(0deg);
}
a.button-rsvp[data-rsvp-scroll="in"] {
  opacity: 0;
}

a.cal-link {
	color: var(--color-text);
	font-weight: 700;
	line-height: 1;
	transition: color 0.3s ease;
	&:hover,
	&:focus {
		color: var(--color-clickable);
	}
}

/* HEADER */

.site-header {
  /* filter: backdrop-filter(blur(10px)); */
  padding-inline: max(2rem, calc((100vw - 1398px) / 2));
  position: sticky;
  background-color: rgba(255, 255, 255, 0.8);
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

.eyebrow {
  background-color: var(--color-text);
  color: white;
  padding: 1rem 2rem;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  text-align: center;
  position: relative;
  /* top: var(--nav-height); */
  z-index: 1;
}

.main-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
  height: var(--nav-height);
  & ul {
    display: none;
    gap: 2rem;
    & li {
      & a:not(.button-rsvp) {
        text-decoration: none;
        color: var(--color-text);
        font-weight: 600;
        line-height: 1;
        text-transform: uppercase;
        transition: color 0.3s ease;
        &:hover,
        &:focus {
          color: var(--color-clickable);
        }
      }
    }
  }
  & ul:last-child {
    display: flex;
    justify-content: center;
  }
  & .button-rsvp {
    min-width: 12rem;
  }
}

@media (min-width: 769px) {
  .main-navigation {
    justify-content: space-between;
    & ul:first-child {
      display: flex;
    }
    & .button-rsvp {
      min-width: 16rem;
    }
  }
}

/* HERO */

.hero {
  min-height: 80vh;
  background-position:
    center,
    -9999px -9999px;
  background-size: cover;
  background-repeat: no-repeat;
  /* margin-block-start: calc(var(--nav-height) * -1); */
  padding-block: 14vh;
  padding-inline: max(2rem, calc((100vw - 1398px) / 2));
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: hsla(182, 47%, 16%, 55%);
    z-index: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  gap: 1rem;
  padding-block-start: var(--nav-height);
}

.hero-content__images {
  img {
    animation: puff-in-center 1.5s ease-in-out;
    animation-delay: 0.25s;
    animation-fill-mode: forwards;
    opacity: 0;
    filter: blur(10px);
    transform: scale(2);
  }
  img:last-of-type {
    margin-block: 1rem;
    padding-inline: 10%;
    animation-delay: 0.5s;
  }
}

@keyframes puff-in-center {
  0% {
    transform: scale(2);
    filter: blur(4px);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    filter: blur(0px);
    opacity: 1;
  }
}

@keyframes slide-in-fwd-center {
  0% {
    transform: translateZ(-1400px);
    opacity: 0;
  }
  100% {
    transform: translateZ(0);
    opacity: 1;
  }
}

.hero-content__text {
  max-width: 648px;
  margin-inline: auto;
  & p,
  & h2 {
    color: white;
    text-align: center;
    animation: slide-in-fwd-center 1.5s ease-in-out;
    animation-delay: 0.75s;
    animation-fill-mode: forwards;
    opacity: 0;
  }
  & h2 {
    font-size: 26px;
    font-weight: 400;
    line-height: 1.15;
    margin-block: 1.5em;
  }
  & p {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.277;
    margin-block: 1em;
    animation-delay: 1s;
  }
}

@media (min-width: 769px) {
  .hero {
    background-position:
      -9999px -9999px,
      center;
  }
  .hero-content {
    & h2 {
      font-size: 40px;
    }
    & p {
      font-size: 24px;
    }
  }
  .hero-content__images {
    img:first-of-type {
      max-width: 1280px;
      margin-inline: auto;
    }
    img:last-of-type {
      max-width: 740px;
      margin-inline: auto;
    }
  }
}

/* Content */

.container {
  padding-inline: max(3rem, calc((100vw - 1398px) / 2));
  padding-block: 4rem;
  & h2,
  & h3 {
    text-align: center;
    max-width: 44ch;
    margin-inline: auto;
  }
}

/* About */

.about {
  background-color: hsla(182, 66%, 76%, 24%);
}

.about-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin-block: 3rem;
  margin-inline: auto;
  gap: 0.5rem;
  & li {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--color-primary);
    text-align: center;
    & img {
      width: 100%;
      height: auto;
    }
    & > div {
      flex: 1 1 auto;
    }
  }
}

.about-list__content {
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  & ul {
    list-style: none;
    padding: 0;
    margin: 0.333em 0;
    text-align: center;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
  }
  h4 {
    flex: 1 0 auto;
  }
}

@media (min-width: 769px) {
  .about-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    & > li {
      flex: 0 0 320px;
      width: 320px;
    }
  }
}
@media (min-width: 1398px) {
  .about-list {
    & > li {
      flex: 0 0 343px;
      width: 343px;
    }
  }
}

/* Sponsors */

.sponsors {
  & img {
    max-width: 1120px;
    margin-inline: auto;
  }
}

/* Venue */

.venue {
  background-color: hsla(182, 47%, 16%, 24%);
}

.venue__item {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-block: 2rem;

  & img,
  & iframe {
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 69/58;
    width: 100%;
  }
  &:first-of-type {
    margin-block-end: 5rem;
  }
}

@media (min-width: 769px) {
  .venue__item {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    margin-block: 3rem;
    gap: 12px;
    & > div {
      /* width: calc(50% - 3rem); */
      align-content: center;
    }
    & > div:first-of-type {
      grid-column: 1 / 6;
    }
    & > div:last-of-type {
      grid-column: 7 / 11;
    }
  }
  .venue__item--right {
    & > div:first-of-type {
      grid-column: 6 / 11;
      grid-row: 1 / 2;
    }
    & > div:last-of-type {
      grid-column: 1 / 5;
      grid-row: 1 / 2;
    }
  }
}

/* RSVP */

.rsvp {
  background-color: hsla(182, 66%, 76%, 24%);
	.gform_description {
		font-size: 28px;
		line-height: 1.2;
		font-weight: 600;
		color: var(--color-text);
		margin-block: 0.333em;
		text-align: center;
	}
}

.rsvp__form {
  max-width: 1120px;
  margin-inline: auto;
}

/* Footer */

.footer_images {
  margin: 0;
  padding-block-start: 2rem;
  background-color: hsla(180, 46%, 16%, 100%);
}

.site-footer {
  background-color: hsla(180, 46%, 16%, 100%);
}
.site-info p {
  color: white;
  font-size: 12px;
  & a {
    color: white;
  }
}

.site-footer__logo {
  max-width: 270px;
  padding-block-end: 1rem;
}

@media (min-width: 769px) {
  .site-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }
  .footer_images {
    padding-block-start: 0;
  }
}

/* Gravity Forms */

.gform_wrapper.gform-theme.gform-theme--foundation.gform-theme--framework.gform-theme--orbital {
  & label,
  & legend {
    font-size: 24px;
    color: var(--color-text);
    font-weight: 600;
    margin-block: 0.25em;
  }
  & label.gform-field-label--type-sub {
    font-size: 16px;
  }
  & input,
  & select {
    border: 1px solid var(--color-text);
    border-radius: 8px;
    /* padding: 0.5em 1em; */
    font-size: 16px;
    color: var(--color-text);
  }

  & .ginput_container.ginput_container_radio.ginput_container_image_choice {
    & > .gfield_radio {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1rem;
      align-content: center;
    }
  }

  & .gchoice {
    background-color: transparent;
    border: none;
    box-shadow: none;
    max-inline-size: 100%;
    width: 100%;
    & img {
      max-inline-size: 180px;
    }
    & input[type="radio"] {
      visibility: hidden;
      position: absolute;
      left: -9999px;
      top: -9999px;
    }
    & label {
      padding: 0;
      margin: 0;
      text-align: center;
    }
    &:where(:has(input:checked))::after {
      inset-block-start: 10%;
      inset-inline-end: 24%;
      background-color: var(--color-clickable);
      border: 2px solid white;
    }
  }

  & .gfield--type-image_choice {
    display: none;
  }

  & .gfield-image-choice-wrapper-outer {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  & .gfield-image-choice-wrapper-inner {
    font-size: 16px;
    display: inline-block;
    background-color: transparent;
    border: 1px solid var(--color-text);
    color: var(--color-text);
    padding: 0.666rem 2rem;
    border-radius: 100vw;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    &:hover,
    &:focus {
      background-color: var(--color-primary);
    }
    & label {
      font-size: 16px;
    }
    &:has(input:checked) {
      background-color: var(--color-primary);
    }
  }

  & #field_submit {
    margin-block: 1rem;
		display: flex;
		flex-direction: column;
		align-items: center;
    & input {
      display: inline-block;
      inline-size: fit-content;
      margin-inline: auto;
      /* background-color: var(--color-text); */
      max-width: 522px;
      /* width: 100%;
      border-radius: 100vw;
      margin-inline: auto;
			&:hover,
			&:focus {
				background-color: var(--color-text-light);
				color: white;
			} */
    }
  }

  .gfield--type-turnstile {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .gform_confirmation_message {
    margin-block: 4rem;
    & p {
      max-width: 32ch;
    }
  }
}

@media (min-width: 541px) {
  .gform_wrapper.gform-theme.gform-theme--foundation.gform-theme--framework.gform-theme--orbital {
    & .ginput_container.ginput_container_radio.ginput_container_image_choice {
      & > .gfield_radio {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        align-content: center;
      }
    }
  }
}

@media (min-width: 1025px) {
  .gform_wrapper.gform-theme.gform-theme--foundation.gform-theme--framework.gform-theme--orbital {
    & .ginput_container.ginput_container_radio.ginput_container_image_choice {
      & > .gfield_radio {
        grid-template-columns: repeat(3, 1fr);
      }
    }
    & .gfield--type-image_choice {
      display: block;
    }
  }
}
