@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Great+Vibes&display=swap");

:root {
  --paper: #f8f7f4;
  --ink: #4a3a34;
  --ink-dark: #243747;
  --line: #9b8b7f;
  --blue-line: #435d73;
  --accent: #2e3d4c;
  --ring: #d8d0c8;
  --script: "Great Vibes", "Brush Script MT", cursive;
  --serif: "Cormorant Garamond", Georgia, serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background:
    linear-gradient(rgb(235 244 249 / 74%), rgb(235 244 249 / 74%)),
    url("img/bg2.jpg") center top / cover fixed;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
.main {
  width: min(100%, 570px);
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(rgb(248 247 244 / 91%), rgb(248 247 244 / 91%)),
    url("img/bg.png") center top / 500px auto repeat;
  box-shadow:
    0 26px 75px rgb(71 91 105 / 18%),
    0 0 0 1px rgb(255 255 255 / 72%);
}
.section {
  position: relative;
  padding: 62px 22px;
  text-align: center;
  max-width: 550px;
  margin: 0 auto;
}
.section > * {
  position: relative;
  z-index: 2;
}
.section::before {
  content: "";
  position: absolute;
  inset: 16px 24px;
  z-index: 0;
  pointer-events: none;
  border-left: 1px solid rgb(111 135 157 / 18%);
  border-right: 1px solid rgb(111 135 157 / 28%);
  opacity: 0.75;
}
.section::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  background: url("img/botanical-lineart.png") center / contain no-repeat;
}
h1,
h2,
p {
  margin: 0;
  font-weight: 400;
}
h1,
h2 {
  color: var(--ink-dark);
  text-transform: uppercase;
}
h1 {
  font-size: clamp(37px, 11vw, 49px);
  line-height: 1;
  text-transform: none;
  font-family: var(--script);
  font-weight: 400;
}
h1 span {
  font-family: var(--serif);
  font-size: 0.8em;
}
h2 {
  font-size: 30px;
  line-height: 1.28;
  letter-spacing: 0.01em;
}
p {
  color: var(--ink);
}
.hero {
  min-height: 860px;
  padding-top: 114px;
}
.hero::before {
  inset: 34px 34px 30px;
  border: 1px solid rgb(111 135 157 / 36%);
  border-top-width: 0;
}
.hero::after {
  top: 24px;
  right: -92px;
  width: 390px;
  height: 570px;
  opacity: 0.58;
}
.hero .eyebrow::before,
.hero .eyebrow::after,
.rsvp__intro::before,
.rsvp__intro::after,
.final .script-note::before,
.final .script-note::after {
  content: "";
  display: inline-block;
  width: 46px;
  height: 1px;
  margin: 0 12px 5px;
  background: rgb(111 135 157 / 52%);
}
.eyebrow {
  margin-bottom: 28px;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero__image {
  display: block;
  width: min(100%, 237px);
  height: 315px;
  margin: 27px auto 23px;
  object-fit: cover;
  object-position: center 62%;
  border-radius: 1px;
  box-shadow: 0 18px 36px rgb(74 83 86 / 16%);
}
.date-large {
  margin-bottom: 24px;
  font-size: 32px;
  color: var(--ink-dark);
}
.sound-button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin: 0 auto 8px;
  padding: 0;
  color: var(--ink-dark);
  background: transparent;
  border: 1px solid var(--ink-dark);
  border-radius: 50%;
}
.sound-button__icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--ink-dark);
}
.sound-button[aria-pressed="true"] .sound-button__icon {
  width: 10px;
  height: 12px;
  margin-left: 0;
  border: 0;
  background: linear-gradient(
    to right,
    var(--ink-dark) 0 3px,
    transparent 3px 7px,
    var(--ink-dark) 7px 10px
  );
}
.script-note,
.script-title {
  font-family: var(--script);
  font-size: 25px;
  line-height: 1.1;
}
.welcome::after,
.details::after,
.dress-code::after,
.final::after {
  left: -118px;
  bottom: -64px;
  width: 395px;
  height: 578px;
  opacity: 0.5;
}
.welcome {
  padding-top: 4px;
  padding-bottom: 47px;
}
.welcome h2 {
  margin-bottom: 14px;
}
.welcome p {
  line-height: 1.65;
}
.calendar {
  padding-top: 16px;
  padding-bottom: 58px;
}
.calendar::after,
.locations::after,
.wishes::after,
.rsvp::after {
  top: -84px;
  right: -118px;
  width: 385px;
  height: 562px;
  opacity: 0.42;
  transform: rotate(180deg);
}
.calendar h2 {
  margin-bottom: 15px;
}
.calendar__grid {
  width: 310px;
  max-width: 100%;
  margin: 11px auto 44px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px 5px;
  font-family: Arial, sans-serif;
  font-size: 17px;
  color: var(--ink-dark);
}
.calendar__grid span {
  min-height: 25px;
  display: grid;
  place-items: center;
}
.calendar__grid .is-selected {
  position: relative;
  font-weight: 700;
  isolation: isolate;
}
.calendar__grid .is-selected::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 38px;
  height: 32px;
  background: url("img/Vector.svg") center / contain no-repeat;
  transform: translate(-50%, -50%);
  opacity: 0.58;
}
.calendar__time-label {
  margin-bottom: 3px;
}
.time {
  font-family: var(--script);
  font-size: 36px;
  line-height: 1;
}
.details {
  padding-top: 12px;
  padding-bottom: 46px;
}
.details h2 {
  margin-bottom: 28px;
}
.timeline {
  position: relative;
  width: 286px;
  min-height: 347px;
  margin: auto;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 81px;
  left: 50%;
  width: 2px;
  background: rgb(36 55 71 / 52%);
  transform: translateX(-50%);
}
.timeline__item {
  position: relative;
  width: 50%;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.timeline__item::after {
  content: "";
  position: absolute;
  top: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink-dark);
  border-radius: 50%;
  background: var(--paper);
  box-shadow:
    0 0 0 4px var(--paper),
    inset 0 0 0 2px rgb(255 255 255 / 38%);
}
.timeline__item--left {
  align-items: flex-end;
  padding-right: 33px;
  text-align: right;
}
.timeline__item--right {
  margin-left: 50%;
  align-items: flex-start;
  padding-left: 33px;
  text-align: left;
}
.timeline__item--left::after {
  right: 0;
  transform: translateX(50%);
}
.timeline__item--right::after {
  left: 0;
  transform: translateX(-50%);
}
.timeline strong {
  font-family: var(--script);
  font-size: 29px;
  font-weight: 400;
}
.locations {
  padding-top: 16px;
  padding-bottom: 58px;
}
.locations h2 {
  margin-bottom: 16px;
}
.locations__notice {
  max-width: 365px;
  margin: 0 auto;
  padding: 12px 15px;
  color: var(--ink-dark);
  border-top: 1px solid rgb(111 135 157 / 38%);
  border-bottom: 1px solid rgb(111 135 157 / 38%);
  font-size: 17px;
  line-height: 1.4;
}
.locations__notice span {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-family: var(--script);
  font-size: 25px;
  line-height: 1;
}
.locations__list {
  display: grid;
  width: min(100%, 430px);
  gap: 12px;
  margin: 30px auto 0;
}
.location-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 136px;
  padding: 18px 42px 18px;
  color: var(--ink-dark);
  text-align: center;
  background: rgb(255 255 255 / 34%);
  border: 1px solid rgb(111 135 157 / 26%);
  border-top: 2px solid rgb(111 135 157 / 36%);
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}
.location-link:hover,
.location-link:focus-visible {
  background: rgb(255 255 255 / 65%);
  border-color: var(--ink-dark);
  border-top-color: var(--ink-dark);
}
.location-link__number {
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.location-link__type {
  color: var(--ink-dark);
  font-size: 25px;
  line-height: 1.1;
}
.location-link__address {
  max-width: 330px;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-style: normal;
  line-height: 1.35;
}
.location-link__action {
  margin-top: 5px;
  padding-bottom: 2px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.3;
}
.location-link__action span {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  transition: transform 160ms ease;
}
.location-link__action svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.location-link__action path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}
.location-link:hover .location-link__action span,
.location-link:focus-visible .location-link__action span {
  transform: translate(2px, -2px);
}
.location-link__arrow {
  position: absolute;
  top: 17px;
  right: 19px;
  color: var(--ink-dark);
  font-family: Arial, sans-serif;
  font-size: 23px;
  line-height: 1;
}
.dress-code {
  padding-top: 13px;
  padding-bottom: 53px;
}
.dress-code h2,
.wishes h2 {
  margin-bottom: 12px;
}
.dress-code p,
.wishes p {
  line-height: 1.7;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 27px;
}
.swatch {
  display: block;
  width: 50px;
  height: 50px;
  margin: 0 auto;
  border: 1px solid rgb(74 58 52 / 18%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 28%);
}
.swatch--1 {
  background: #4d5d50;
}
.swatch--2 {
  background: #7892aa;
}
.swatch--3 {
  background: #b3d4ed;
}
.swatch--4 {
  background: #3f271b;
}
.swatch--5 {
  background: #e6d7c4;
}
.wishes {
  padding-top: 4px;
  padding-bottom: 67px;
}
.rsvp {
  padding-top: 0;
  padding-bottom: 45px;
  text-align: left;
}
.rsvp h2,
.rsvp__intro {
  text-align: center;
}
.rsvp h2 {
  margin-bottom: 7px;
}
.rsvp__intro {
  line-height: 1.7;
  font-size: 15px;
}
form {
  margin-top: 44px;
}
form > label {
  display: block;
  margin-bottom: 12px;
  padding: 12px 14px;
  color: var(--ink-dark);
  background: rgb(255 255 255 / 28%);
  border: 1px solid rgb(111 135 157 / 22%);
  border-left: 3px solid rgb(111 135 157 / 60%);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
}
legend {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}
input[type="text"] {
  width: 100%;
  height: 63px;
  padding: 0 25px;
  color: var(--ink-dark);
  background: rgb(255 255 255 / 43%);
  border: 1px solid rgb(111 135 157 / 34%);
  outline: 0;
}
input[type="text"]:focus {
  border-color: var(--ink-dark);
}
input::placeholder {
  color: #c2bdb6;
}
fieldset {
  margin: 23px 0 21px;
  padding: 0;
  border: 0;
}
legend {
  padding: 0;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 10px 0;
}
input[type="radio"] {
  appearance: none;
  width: 25px;
  height: 25px;
  margin: 0;
  border: 2px solid rgb(111 135 157 / 45%);
  border-radius: 50%;
}
input[type="radio"]:checked {
  border: 7px solid var(--ink-dark);
}
.submit-button {
  width: 176px;
  height: 54px;
  color: white;
  background: #657887;
  border: 0;
  border-radius: 40px;
  text-transform: uppercase;
  font-weight: 600;
}
.submit-button:hover {
  background: #566a78;
}
.submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.form-message {
  min-height: 28px;
  margin-top: 14px;
  color: var(--ink-dark);
}
.form-message--success,
.form-message--error {
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.35;
}
.form-message--success {
  color: #174f3b;
  background: #dff3e8;
  border: 2px solid #4b9b72;
  font-size: 21px;
  animation: success-message-in 0.35s ease-out;
}
.form-message--error {
  color: #873b34;
  background: #f9e5e1;
  border: 1px solid #c9786d;
}
@keyframes success-message-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.final {
  padding: 0 22px 42px;
}
.final::before {
  inset: 20px 42px 24px;
  border-left: 1px solid rgb(111 135 157 / 18%);
  border-right: 1px solid rgb(111 135 157 / 28%);
}
.final::after {
  top: 34px;
  bottom: auto;
}
.final img {
  display: block;
  width: 176px;
  height: 235px;
  aspect-ratio: 3 / 4;
  margin: 0 auto 18px;
  object-fit: cover;
  object-position: center 58%;
  border-radius: 1px;
  box-shadow: 0 16px 32px rgb(74 83 86 / 15%);
}
.final .script-note {
  margin-bottom: 15px;
  font-size: 21px;
}
.countdown {
  display: flex;
  justify-content: center;
  align-items: start;
  gap: 8px;
  color: var(--ink-dark);
  font-family: var(--script);
}
.countdown div {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
}
.countdown strong {
  font-size: 31px;
  font-weight: 400;
}
.countdown span {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 11px;
}
.countdown i {
  font-size: 27px;
  font-style: normal;
  line-height: 0.85;
}
.final__caption {
  margin-top: 26px;
  font-size: 17px;
  text-transform: uppercase;
}

.created-by {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 18px 24px;
  color: rgb(74 58 52 / 38%);
  text-decoration: none;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition:
    opacity 160ms ease,
    color 160ms ease;
}
.created-by:hover,
.created-by:focus-visible {
  color: rgb(74 58 52 / 48%);
}
.created-by span:first-child {
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.34em;
  opacity: 0.8;
}
a.created-by span:last-child {
  display: block;
  font-family: var(--script);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: none;
  line-height: 1;
  opacity: 0.75;
}

@media (max-width: 480px) {
  .section::before {
    inset: 15px;
  }
  .hero::after {
    right: -148px;
    width: 350px;
    height: 511px;
    opacity: 0.45;
  }
  .welcome::after,
  .details::after,
  .dress-code::after,
  .final::after {
    left: -172px;
    width: 335px;
    height: 490px;
    opacity: 0.28;
  }
  .calendar::after,
  .locations::after,
  .wishes::after,
  .rsvp::after {
    right: -174px;
    width: 335px;
    height: 490px;
    opacity: 0.26;
  }
  .hero .eyebrow::before,
  .hero .eyebrow::after,
  .rsvp__intro::before,
  .rsvp__intro::after,
  .final .script-note::before,
  .final .script-note::after {
    width: 24px;
    margin-inline: 8px;
  }
}

@media (max-width: 360px) {
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero {
    min-height: 760px;
    padding-top: 90px;
  }
  .hero::after {
    right: -154px;
    width: 330px;
    height: 482px;
  }
  .welcome::after,
  .details::after,
  .dress-code::after,
  .final::after {
    left: -178px;
    width: 320px;
    height: 468px;
  }
  .calendar::after,
  .locations::after,
  .wishes::after,
  .rsvp::after {
    right: -178px;
    width: 320px;
    height: 468px;
  }
  .hero__image {
    width: 230px;
    height: 305px;
  }
  .calendar__grid {
    width: 290px;
    gap: 6px 2px;
  }
  .timeline {
    width: 270px;
  }
  .swatches {
    grid-template-columns: repeat(3, 68px);
    gap: 8px;
  }
  .rsvp .submit-button {
    width: 160px;
    height: 50px;
  }
}
