@font-face {
  font-family: "Galada:Regular";
  src: url("https://static.figma.com/font/Galada-Regular_1") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --green: #19322a;
  --red: #af3445;
  --content: 858px;
  color: var(--green);
  font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  background: #fff;
}

body {
  padding-bottom: 160px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
.button,
.brand {
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

button:hover,
.button:hover,
.brand:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.shell {
  width: min(var(--content), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  padding-top: 40px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
}

.brand img {
  width: 24px;
  height: 24px;
}

.nav-links {
  display: flex;
  flex: 1;
  gap: 24px;
}

.nav-links a {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 8px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.button-red {
  background: var(--red);
}

.button-green {
  background: var(--green);
}

main {
  display: flex;
  flex-direction: column;
  gap: 160px;
  padding-top: 80px;
}

section {
  scroll-margin-top: 32px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.hero>p {
  margin-top: -24px;
}

.heading {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eyebrow {
  margin: 0;
  color: rgb(25 50 42 / 80%);
  font-size: 14px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Galada:Regular", Georgia, serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 52px;
}

h3,
p {
  margin: 0;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
}

.detail-row img {
  flex: 0 0 auto;
}

.detail-time {
  justify-content: flex-end;
}

.detail-label {
  white-space: nowrap;
}

.ball {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  padding-top: 6px;
  background: url("./assets/13cf6.svg") center / 48px 48px no-repeat;
  color: #fff;
  font-family: "Galada:Regular", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 48px;
}

.flipped {
  transform: rotate(180deg) scaleY(-1);
}

section:not(.hero) {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stack,
.section-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-item h3 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
}

.info-item h3 img,
.guest-grid img {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 4px;
}

.info-item p+p {
  margin-top: 16px;
}

.rsvp-form {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ball-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.rsvp-form input {
  width: 100%;
  min-width: 240px;
  min-height: 48px;
  border: 1px solid rgb(25 50 42 / 80%);
  border-radius: 999px;
  outline: 0;
  padding: 8px 24px;
  background: #fff;
}

.rsvp-form input::placeholder {
  color: rgb(25 50 42 / 80%);
  opacity: 1;
}

.rsvp-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(25 50 42 / 12%);
}

.guest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 24px;
}

.guest-grid span {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: "Galada:Regular", Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 28px;
}

footer>img {
  align-self: center;
  width: 24px;
  height: 24px;
  margin-top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 760px) {
  :root {
    font-size: 16px;
  }

  body {
    padding-bottom: 80px;
  }

  .shell {
    width: min(100% - 32px, var(--content));
  }

  .site-header {
    padding-top: 20px;
  }

  .nav {
    gap: 12px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav-links a {
    min-height: 40px;
    padding: 6px 4px;
    font-size: 14px;
  }

  .nav-action {
    margin-left: auto;
    min-height: 44px;
    font-size: 14px;
  }

  main {
    gap: 96px;
    padding-top: 64px;
  }

  .hero {
    gap: 36px;
  }

  .hero>p {
    margin-top: -12px;
  }

  h1,
  h2 {
    font-size: clamp(34px, 10vw, 44px);
    line-height: 1.08;
  }

  .event-details {
    gap: 20px;
  }

  .detail-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .detail-row .detail-label:first-child {
    width: 100%;
  }

  .detail-time {
    padding-left: 32px;
  }

  .detail-time .detail-label {
    width: 100%;
    white-space: normal;
  }

  .detail-address .detail-label:last-child {
    flex: 1;
  }

  .ball {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    padding-top: 4px;
    font-size: 25px;
    background-size: 42px 42px;
    line-height: 42px;
  }

  .rsvp-form {
    flex-wrap: wrap;
  }

  .rsvp-form input {
    flex-basis: 100%;
  }

  .rsvp-form .button {
    flex: 1;
  }

  .guest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .detail-row {
    gap: 6px;
  }

  .ball {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    background-size: 38px 38px;
    font-size: 23px;
    line-height: 38px;
  }
}

.rsvp-form .button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.rsvp-feedback:empty {
  display: none;
}

.rsvp-feedback[data-error="true"] {
  color: var(--red);
}

.guest-counts strong {
  font-weight: 700;
}

@media (max-width: 500px) {
  .detail-time {
    display: flex;
    justify-content: flex-end;
  }

  .ball-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 8px;
    padding-right: 72px;
  }

  .detail-label.left {
    display: flex;
    justify-content: flex-start;
  }

  .detail-label {
    display: flex;
    justify-content: flex-end;
  }

  .ball {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    padding-top: 4px;
    font-size: 22px;
    background-size: 30px 30px;
    line-height: 30px;
  }
}