:root {
  color-scheme: light;
  --paper: #fffaf2;
  --cream: #f4e7d3;
  --terracotta: #a4492f;
  --terracotta-dark: #75301f;
  --forest: #274b3c;
  --ink: #29221d;
  --muted: #6f6258;
  --gold: #bd8b3c;
  --line: rgba(117, 48, 31, 0.2);
  --shadow: 0 24px 70px rgba(76, 47, 28, 0.14);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(189, 139, 60, 0.16), transparent 24rem),
    radial-gradient(circle at 92% 30%, rgba(164, 73, 47, 0.12), transparent 28rem),
    var(--cream);
  font-family: var(--sans);
  line-height: 1.6;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(117, 48, 31, 0.1);
  border-radius: 50%;
  content: "";
}

body::before {
  top: -8rem;
  left: -7rem;
}

body::after {
  right: -6rem;
  bottom: -9rem;
}

a {
  color: inherit;
}

.page-shell {
  width: min(100% - 1.5rem, 70rem);
  margin: 0.75rem auto;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(117, 48, 31, 0.12);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.hero,
.details,
.message,
.wishes {
  padding: 4.5rem 1.25rem;
}

.hero {
  position: relative;
  padding-top: 5rem;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(rgba(255, 250, 242, 0.84), rgba(255, 250, 242, 0.96)),
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 10px,
      rgba(164, 73, 47, 0.05) 10px,
      rgba(164, 73, 47, 0.05) 11px
    );
}

.hero::before,
.hero::after {
  position: absolute;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 5rem;
  line-height: 1;
  opacity: 0.35;
  content: "✦";
}

.hero::before {
  top: 1.2rem;
  left: 7%;
}

.hero::after {
  top: 8rem;
  right: 5%;
  font-size: 2.5rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.65rem;
  color: var(--terracotta);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
}

h1 {
  max-width: 12ch;
  margin-right: auto;
  margin-bottom: 1.5rem;
  margin-left: auto;
  color: var(--terracotta-dark);
  font-size: clamp(3rem, 13vw, 6.8rem);
}

h1 span {
  display: block;
  color: var(--forest);
  font-size: 0.48em;
  font-style: italic;
}

h2 {
  margin-bottom: 1.25rem;
  color: var(--forest);
  font-size: clamp(2.15rem, 7vw, 3.8rem);
}

h3 {
  margin-bottom: 0.2rem;
  color: var(--terracotta-dark);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.intro {
  max-width: 35rem;
  margin-right: auto;
  margin-bottom: 3rem;
  margin-left: auto;
  color: var(--muted);
  font-size: 1.05rem;
}

.photo-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 0.75rem;
}

.photo-card {
  position: relative;
  width: 108%;
  margin: -0.5rem -4%;
  padding: 0.4rem 0.4rem 0.8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.1rem;
  box-shadow: 0 14px 28px rgba(76, 47, 28, 0.22);
}

.photo-card:nth-child(1) {
  z-index: 2;
  transform: translate(3%, 4%) rotate(-6deg);
}

.photo-card:nth-child(2) {
  z-index: 4;
  transform: translate(-3%, -3%) rotate(5deg);
}

.photo-card:nth-child(3) {
  z-index: 3;
  transform: translate(4%, 2%) rotate(4deg);
}

.photo-card:nth-child(4) {
  z-index: 1;
  transform: translate(-4%, -4%) rotate(-5deg);
}

.photo-card:nth-child(5) {
  z-index: 5;
  transform: translate(5%, -5%) rotate(-4deg);
}

.photo-card:nth-child(6) {
  z-index: 7;
  transform: translate(-4%, -8%) rotate(6deg);
}

.photo-card:nth-child(7) {
  z-index: 6;
  transform: translate(3%, -6%) rotate(5deg);
}

.photo-card:nth-child(8) {
  z-index: 8;
  transform: translate(-5%, -10%) rotate(-4deg);
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--cream);
}

.details {
  max-width: 59rem;
  margin: 0 auto;
  text-align: center;
}

.detail-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
  text-align: left;
}

.detail-card {
  display: flex;
  align-items: center;
  min-height: 10rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fffdf9;
}

.detail-card p {
  margin-bottom: 0.15rem;
}

.detail-number,
.detail-icon {
  display: grid;
  flex: 0 0 auto;
  width: 4.25rem;
  height: 4.25rem;
  margin-right: 1.25rem;
  place-items: center;
  color: var(--paper);
  background: var(--terracotta);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.65rem;
}

.detail-icon {
  background: var(--forest);
  font-size: 2rem;
}

.detail-note {
  color: var(--terracotta);
  font-weight: 700;
}

.detail-card a {
  display: inline-block;
  min-height: 2.75rem;
  padding-top: 0.5rem;
  color: var(--forest);
  font-weight: 700;
  text-underline-offset: 0.22rem;
}

.message {
  position: relative;
  color: var(--paper);
  text-align: center;
  background: var(--forest);
}

.message::before {
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(255, 250, 242, 0.25);
  border-radius: 50% 50% 0.75rem 0.75rem;
  content: "";
  pointer-events: none;
}

.message > * {
  position: relative;
}

.message h2 {
  max-width: 18ch;
  margin-right: auto;
  margin-left: auto;
  color: var(--paper);
}

.message > p {
  max-width: 36rem;
  margin-right: auto;
  margin-left: auto;
  color: rgba(255, 250, 242, 0.82);
}

.ornament {
  margin-bottom: 1rem;
  color: #e5bd71;
  font-size: 2rem;
}

.message .signature {
  margin-top: 2rem;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.signature strong {
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
}

.wishes {
  max-width: 49rem;
  margin: 0 auto;
  text-align: center;
}

.wish-links {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
}

.wish-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 1rem 1.25rem;
  color: var(--terracotta-dark);
  border: 1px solid var(--terracotta);
  border-radius: 999px;
  font-family: var(--serif);
  font-size: 1.2rem;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.wish-link:hover,
.wish-link:focus-visible {
  color: var(--paper);
  background: var(--terracotta);
  transform: translateY(-2px);
}

a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

footer {
  padding: 1.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (min-width: 42rem) {
  .page-shell {
    width: min(100% - 3rem, 70rem);
    margin: 1.5rem auto;
    border-radius: 2rem;
  }

  .hero,
  .details,
  .message,
  .wishes {
    padding: 6.5rem 3rem;
  }

  .photo-collage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 1.5rem 0.5rem 0;
  }

  .photo-card {
    width: 120%;
    margin-right: -10%;
    margin-left: -10%;
    padding: 0.5rem 0.5rem 1rem;
  }

  .detail-grid,
  .wish-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 70rem) {
  .page-shell {
    margin: 3rem auto;
  }

  .hero {
    padding-top: 7.5rem;
  }
}

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

  .wish-link {
    transition: none;
  }
}
