:root {
  color-scheme: light;
  --bg: #f5f1ea;
  --ink: #1f2527;
  --muted: #66706f;
  --line: #d8cec0;
  --surface: #fffaf2;
  --accent: #6d4b32;
  --accent-dark: #3f2b1e;
  --shadow: 0 24px 70px rgba(31, 37, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

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

.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 56px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 650px;
}

.dates {
  margin: 0 0 16px;
  color: var(--accent);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(58px, 8vw, 112px);
  line-height: 0.92;
  font-weight: 500;
  letter-spacing: 0;
}

.dedication {
  max-width: 540px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 23px;
  line-height: 1.45;
}

.actions,
.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button,
.link-list a {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.button {
  padding: 0 22px;
}

.primary {
  background: var(--accent-dark);
  color: #fffaf2;
}

.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.52);
}

.portrait-card {
  margin: 0;
}

.memory-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #e6dccd;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 900ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
}

.carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 250, 242, 0.62);
  border-radius: 999px;
  background: rgba(31, 37, 39, 0.24);
  color: #fffaf2;
  cursor: pointer;
  opacity: 0.64;
  transform: translateY(-50%);
  transition:
    background 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  background: rgba(31, 37, 39, 0.46);
  opacity: 1;
}

.carousel-control:focus-visible {
  outline: 2px solid #fffaf2;
  outline-offset: 2px;
}

.carousel-control:active {
  transform: translateY(-50%) scale(0.96);
}

.carousel-control span {
  display: block;
  margin-top: -2px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 34px;
  line-height: 1;
}

.carousel-control-previous {
  left: 12px;
}

.carousel-control-next {
  right: 12px;
}

.slide-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.placeholder-slide {
  padding: 32px;
  text-align: center;
}

.placeholder-slide::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 250, 242, 0.65);
  border-radius: 6px;
}

.placeholder-slide span {
  position: relative;
  color: rgba(63, 43, 30, 0.72);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.placeholder-family {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 250, 242, 0.82), transparent 24%),
    linear-gradient(135deg, rgba(109, 75, 50, 0.16), transparent 50%),
    #eadfd0;
}

.placeholder-friends {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 250, 242, 0.76), transparent 26%),
    linear-gradient(150deg, rgba(31, 37, 39, 0.13), transparent 52%),
    #d9d8ce;
}

.placeholder-moments {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 250, 242, 0.7), transparent 28%),
    linear-gradient(140deg, rgba(109, 75, 50, 0.18), transparent 54%),
    #e4d2c2;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(63, 43, 30, 0.24);
  transition: background 300ms ease;
}

.carousel-dots span.is-active {
  background: var(--accent-dark);
}

figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.sharing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 470px);
  gap: 44px;
  padding: 46px 0 10px;
  align-items: start;
}

h2 {
  margin-bottom: 14px;
  font-size: 38px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: 0;
}

.sharing p {
  max-width: 590px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.link-list {
  flex-direction: column;
}

.link-list a {
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.link-list span,
.link-list small {
  display: block;
}

.link-list small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 800px) {
  .page-shell {
    width: min(100% - 28px, 1120px);
    padding: 22px 0;
  }

  .hero,
  .sharing {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 34px;
    padding: 34px 0;
  }

  h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .dedication {
    font-size: 20px;
  }

  .portrait-card {
    max-width: 440px;
  }

  .sharing {
    padding-top: 36px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .carousel-control {
    width: 34px;
    height: 34px;
  }

  .carousel-control-previous {
    left: 10px;
  }

  .carousel-control-next {
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide {
    transition: none;
  }
}
