:root {
  --color-wine: #7a0303;
  --color-wine-soft: #8f1b1b;
  --color-cream: #fefaef;
  --color-text: #681313;
  --color-muted: #9a6e62;
  --color-white: #ffffff;
  --radius-lg: 28px;
  --container-width: 460px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #e8dfd0;
  color: var(--color-text);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 100%;
  letter-spacing: 0;
}

[x-cloak] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  width: min(100%, var(--container-width));
  margin: 0 auto;
  background: var(--color-cream);
  min-height: 100vh;
  box-shadow: 0 24px 80px rgba(68, 20, 15, 0.16);
}

.section {
  padding: 50px 24px;
  text-align: center;
}

.js .reveal-block {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
  will-change: opacity, transform;
}

.js .reveal-block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-cream {
  background: var(--color-cream);
  color: var(--color-text);
}

.section-wine {
  background: var(--color-wine);
  color: var(--color-cream);
}

.hero {
  padding-top: 0;
}

.hero__top {
  padding: 48px 24px 30px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 15px;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.82;
}

h1,
h2 {
  margin: 0 0 16px;
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.08;
}

h1 {
  font-size: clamp(42px, 13vw, 58px);
}

h2 {
  font-size: 38px;
}

p {
  margin: 0 auto 14px;
  max-width: 30em;
  font-size: 18px;
  line-height: 1.58;
}

address {
  margin: 18px 0;
  font-style: normal;
  line-height: 1.5;
}

.heart {
  font-size: 26px;
  line-height: 1;
}

.heart--wine {
  color: var(--color-wine);
  margin-top: 20px;
}

.hero__date {
  margin-top: 14px;
  font-size: 24px;
  letter-spacing: 0;
}

.polaroid {
  width: calc(100% - 48px);
  margin: 0 auto;
  padding: 12px 12px 28px;
  background: var(--color-cream);
  border-radius: 8px;
  transform: rotate(-1.5deg);
  box-shadow: 0 18px 36px rgba(52, 0, 0, 0.22);
}

.polaroid img,
.wide-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: #efe3d2;
}

.intro {
  margin-top: 26px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: var(--color-text);
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin: 24px auto 16px;
  max-width: 340px;
  font-size: 17px;
}

.calendar div {
  color: var(--color-muted);
  font-size: 15px;
}

.calendar span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
}

.calendar__selected {
  position: relative;
  z-index: 0;
  color: var(--color-cream);
  background: transparent;
  font-weight: 600;
}

.calendar__selected::before {
  content: "♥";
  position: absolute;
  z-index: -1;
  top: 47%;
  left: 50%;
  color: var(--color-wine);
  font-family: Arial, sans-serif;
  font-size: 75px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.down-arrow {
  margin-top: 18px;
  font-size: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--color-wine);
  color: var(--color-cream);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button--full {
  width: 100%;
}

.button span {
  display: inline-block;
  min-width: 112px;
}

.button--light {
  background: var(--color-cream);
  color: var(--color-wine);
}

.timeline {
  display: grid;
  gap: 22px;
}

.timeline div {
  display: grid;
  gap: 6px;
}

.timeline strong {
  font-family: Montserrat, Arial, sans-serif;
  font-size: 48px;
  font-weight: 400;
}

.swatches {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 26px 0;
}

.swatches span {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(78, 28, 18, 0.12);
}

.dress-code-section {
  margin: 24px;
  padding: 42px 0 0;
  border: 1px solid rgba(122, 3, 3, 0.18);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dress-code-section h2,
.dress-code-section p,
.dress-code-section .swatches {
  padding-right: 24px;
  padding-left: 24px;
}

.dress-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.86;
  margin: 12px 0 0;
  overflow: hidden;
  background: #efe3d2;
}

.dress-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  opacity: 0;
  animation: dressSlide 6s infinite;
}

.dress-slider img:nth-child(2) {
  animation-delay: 3s;
}

@keyframes dressSlide {
  0% {
    opacity: 0;
  }

  8%,
  50% {
    opacity: 1;
  }

  58%,
  100% {
    opacity: 0;
  }
}

.rsvp-form {
  display: grid;
  gap: 16px;
  text-align: left;
}

.rsvp-form label,
.rsvp-form legend {
  font-size: 16px;
  line-height: 1.45;
}

.rsvp-form input[type="text"] {
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(122, 3, 3, 0.22);
  border-radius: 16px;
  background: #fffaf0;
  color: var(--color-text);
  font: inherit;
}

fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(122, 3, 3, 0.16);
  border-radius: 18px;
}

fieldset label {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(122, 3, 3, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

fieldset label:has(input:checked) {
  border-color: var(--color-wine);
  background: var(--color-wine);
  color: var(--color-cream);
}

fieldset input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.form-message {
  margin: 0;
  min-height: 30px;
  font-size: 18px;
  line-height: 1.5;
}

.form-message.success {
  color: #2e6d3f;
}

.form-message.error {
  color: #9f1717;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 24px 0;
}

.countdown div {
  padding: 14px 6px;
  border-radius: 18px;
  background: rgba(122, 3, 3, 0.08);
}

.countdown strong {
  display: block;
  font-size: 28px;
}

.countdown span {
  font-size: 14px;
  color: var(--color-muted);
}

.today {
  font-family: Montserrat, Arial, sans-serif;
  font-size: 28px;
}

.contacts .contact-row {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(254, 250, 239, 0.24);
  border-radius: 20px;
}

.contacts a:not(.button) {
  color: inherit;
}

@media (min-width: 700px) {
  body {
    padding: 28px 0;
  }

  .site-shell {
    border-radius: 34px;
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal-block {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .dress-slider img {
    animation: none;
  }

  .dress-slider img:first-child {
    opacity: 1;
  }
}
