:root {
  --pine: #6d5f44;
  --moss: #889577;
  --sage: #b5b99e;
  --bark: #6d5f44;
  --soil: #2f251d;
  --linen: #e0d4be;
  --sand: #c8ad8b;
  --paper: #fffaf0;
  --shadow: 0 24px 80px rgba(34, 47, 35, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--soil);
  background:
    radial-gradient(circle at 10% 20%, rgba(181, 185, 158, 0.2), transparent 28rem),
    linear-gradient(180deg, #e5e2dc 0%, #e0d4be 42%, #f7f0e4 100%);
  font-family: "Montserrat", Arial, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(33, 60, 43, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 60, 43, 0.16) 1px, transparent 1px);
  background-size: 34px 34px;
}

a {
  color: inherit;
}

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

.section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(820px, calc(100% - 40px));
}

.hero {
  display: grid;
  align-items: end;
  min-height: 100svh;
  color: var(--paper);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
  filter: saturate(0.92);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(18, 30, 22, 0.22) 0%, rgba(18, 30, 22, 0.42) 48%, rgba(18, 30, 22, 0.82) 100%),
    linear-gradient(90deg, rgba(24, 39, 29, 0.72), rgba(24, 39, 29, 0.2) 62%, transparent 100%);
}

.hero-content {
  position: relative;
  width: min(1000px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px) clamp(56px, 8vw, 92px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e7decf;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-family: "Great Vibes", "Playfair Display", Georgia, serif;
  padding-left: 0.08em;
  font-size: clamp(4.8rem, 12vw, 9.8rem);
  font-weight: 400;
}

.hero h1,
.hero .eyebrow {
  text-shadow: 0 4px 28px rgba(12, 20, 15, 0.58);
}

.script-heading {
  font-family: "Great Vibes", "Playfair Display", Georgia, serif;
  font-size: clamp(4.4rem, 10vw, 8rem);
  font-weight: 400;
  line-height: 0.95;
  color: var(--pine);
}

h2 {
  font-size: clamp(2.6rem, 6vw, 5.6rem);
}

h3 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

p {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.8;
}

.scroll-link {
  display: grid;
  width: 42px;
  height: 62px;
  margin-top: 34px;
  place-items: center;
  border: 1px solid rgba(255, 250, 240, 0.66);
  border-radius: 999px;
}

.scroll-link span {
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  animation: bob 1.8s ease-in-out infinite;
}

.intro {
  display: grid;
  align-items: center;
  padding: 90px 0;
}

.intro h2 {
  color: var(--pine);
}

.intro-text {
  max-width: 680px;
  margin: 28px auto 0;
  color: #5c554b;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  line-height: 1.85;
  text-align: center;
}

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

.timeline {
  display: grid;
  align-items: center;
  min-height: 88vh;
  padding: 80px 0;
  background: #c1c3aa;
  color: var(--soil);
}

.program-heading {
  margin: 0 auto 34px;
  text-align: center;
}

.program-heading .script-heading {
  color: var(--soil);
}

.program-date {
  margin: 12px 0 0;
  color: var(--bark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.7rem, 3.4vw, 3rem);
  line-height: 1.1;
}

.timeline-list {
  display: grid;
  gap: 1px;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.program-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 86px;
  padding: 18px clamp(18px, 4vw, 36px);
  background: #8b9270;
  color: var(--paper);
}

.program-item span {
  color: #fff7e8;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.program-item p {
  margin: 0;
  color: #e3dccf;
  font-size: 1rem;
  line-height: 1.55;
}


.photo-band {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 92vh;
  padding: 90px max(20px, calc((100vw - 1120px) / 2));
}

.dresscode-content {
  width: min(860px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
}

.dresscode-text {
  max-width: 660px;
  margin: 24px auto 38px;
  color: #5c554b;
  font-size: clamp(1.08rem, 1.8vw, 1.36rem);
  line-height: 1.8;
}

.palette {
  position: static;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 2vw, 22px);
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.palette span {
  width: clamp(48px, 7vw, 72px);
  height: clamp(48px, 7vw, 72px);
  background: var(--swatch);
  border: 3px solid rgba(255, 250, 240, 0.78);
  border-radius: 50%;
  box-shadow: 0 14px 32px rgba(47, 37, 29, 0.14);
}

.contacts {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.contacts p {
  margin: 0;
}

.contacts a {
  width: max-content;
  color: var(--pine);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.locations-section {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: 92px 0;
  color: var(--paper);
  background: url("assets/forest-location-bg.jpg") center / cover no-repeat;
}

.locations-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 29, 22, 0.28), rgba(20, 29, 22, 0.72)),
    linear-gradient(90deg, rgba(20, 29, 22, 0.62), rgba(20, 29, 22, 0.18));
}

.locations-content {
  position: relative;
  display: grid;
  gap: 34px;
}

.locations-content .script-heading {
  color: var(--paper);
  text-align: center;
  text-shadow: 0 6px 32px rgba(0, 0, 0, 0.5);
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.location-card {
  min-height: 320px;
  padding: clamp(24px, 4vw, 42px);
  background: rgba(255, 250, 240, 0.86);
  color: var(--soil);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.location-card .section-kicker {
  color: var(--moss);
}

.location-card h3 {
  color: var(--pine);
}

.location-card a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 18px;
  border-bottom: 1px solid currentColor;
  color: var(--pine);
  font-weight: 700;
  text-decoration: none;
}

.location-contacts {
  justify-items: center;
  color: var(--paper);
  text-align: center;
}

.location-contacts a {
  color: var(--paper);
}

.rsvp-section {
  min-height: 100vh;
  padding: 92px 0;
  background:
    linear-gradient(rgba(247, 240, 228, 0.9), rgba(247, 240, 228, 0.9)),
    url("assets/maxim-karina-lake.png") center / cover fixed;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

.form-copy {
  position: sticky;
  top: 90px;
}

.form-copy h2 {
  color: var(--pine);
}

.rsvp-form {
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid rgba(91, 67, 47, 0.18);
  background: rgba(255, 250, 240, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

label,
legend {
  color: #493a2d;
  font-size: 0.96rem;
  font-weight: 700;
}

label {
  display: grid;
  gap: 10px;
}

fieldset {
  min-width: 0;
  margin: 24px 0;
  padding: 0;
  border: 0;
}

input[type="text"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(91, 67, 47, 0.25);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.76);
  color: var(--soil);
  font: inherit;
}

textarea {
  resize: vertical;
}

.option,
.chips label {
  cursor: pointer;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chips input,
.option input {
  accent-color: var(--pine);
}

.chips label {
  display: inline-flex;
}

.chips span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid rgba(91, 67, 47, 0.22);
  background: rgba(242, 234, 220, 0.62);
  color: #493a2d;
}

.chips input {
  position: absolute;
  opacity: 0;
}

.chips input:checked + span {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--paper);
}

.submit-button,
.music-toggle {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.submit-button {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  background: var(--pine);
  color: var(--paper);
  font-weight: 800;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: #2f563d;
}

.form-status {
  min-height: 28px;
  margin: 16px 0 0;
  color: var(--pine);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.55;
}

.music-toggle {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 10;
  display: grid;
  width: 54px;
  height: 54px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 250, 240, 0.62);
  border-radius: 50%;
  background: rgba(33, 60, 43, 0.78);
  color: var(--paper);
  backdrop-filter: blur(12px);
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid currentColor;
}

.music-toggle.is-playing {
  background: var(--bark);
}

.music-toggle.is-playing .play-icon {
  width: 18px;
  height: 18px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65% 100%);
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 900ms ease,
    transform 900ms ease;
}

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

@keyframes bob {
  0%,
  100% {
    transform: translateY(-3px) rotate(45deg);
  }
  50% {
    transform: translateY(5px) rotate(45deg);
  }
}

@media (max-width: 860px) {
  .timeline-list,
  .locations-grid,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .program-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .section {
    min-height: auto;
  }

  .intro,
  .timeline,
  .photo-band,
  .rsvp-section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-media img {
    object-position: 54% 8%;
  }

  h1 {
    font-size: clamp(4.4rem, 24vw, 7.6rem);
  }

  .form-copy {
    position: static;
  }
}

@media (max-width: 520px) {
  .container,
  .narrow,
  .hero-content {
    width: min(100% - 28px, 1120px);
  }

  .music-toggle {
    right: 12px;
    top: 12px;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
