:root {
  --ink: #27332b;
  --muted: #6e766f;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --sage: #5d735f;
  --sage-dark: #415544;
  --blush: #e4c7bb;
  --gold: #bc9660;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 10%, rgba(228, 199, 187, 0.46), transparent 25rem),
    radial-gradient(circle at 88% 82%, rgba(93, 115, 95, 0.16), transparent 28rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  font: inherit;
}

.page {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.monogram {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
}

.monogram img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.date {
  margin: 0;
  color: var(--muted);
}

.collage {
  position: relative;
  height: clamp(250px, 38vh, 340px);
  margin: 24px -4px 10px;
}

.photo {
  position: absolute;
  overflow: hidden;
  border: 7px solid var(--paper);
  border-bottom-width: 25px;
  border-radius: 3px;
  box-shadow: 0 14px 35px rgba(45, 48, 42, 0.18);
  background: #c7b7a2;
}

.photo img,
.photo video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-two video {
  transform: scale(1.65);
}

.photo-one {
  z-index: 2;
  top: 16px;
  left: 4px;
  width: 59%;
  height: 74%;
  transform: rotate(-4deg);
}

.photo-two {
  z-index: 1;
  top: 4px;
  right: 1px;
  width: 49%;
  height: 58%;
  transform: rotate(5deg);
}

.photo-three {
  z-index: 3;
  right: 14px;
  bottom: 0;
  width: 55%;
  height: 53%;
  transform: rotate(2.5deg);
}

main {
  text-align: center;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(39px, 11vw, 55px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.download {
  width: 100%;
  min-height: 58px;
  border-radius: 999px;
  color: #fff;
  background: var(--sage);
  box-shadow: 0 10px 24px rgba(65, 85, 68, 0.24);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.download:hover {
  background: var(--sage-dark);
  box-shadow: 0 12px 30px rgba(65, 85, 68, 0.3);
}

.download:active {
  transform: scale(0.985);
}

.download:focus-visible,
.direct-download:focus-visible,
.after-hours:focus-visible {
  outline: 3px solid var(--blush);
  outline-offset: 4px;
}

.download svg {
  width: 20px;
  height: 20px;
}

.direct-download {
  justify-self: center;
  margin-top: -4px;
  color: var(--sage-dark);
  font-size: 12px;
  text-underline-offset: 3px;
}

.after-hours {
  min-height: 58px;
  padding: 10px 20px;
  border: 1px solid rgba(65, 85, 68, 0.28);
  border-radius: 999px;
  color: var(--sage-dark);
  background: rgba(255, 253, 248, 0.68);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.3;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.after-hours strong {
  font-weight: 750;
}

.after-hours svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.after-hours:hover {
  background: var(--paper);
  border-color: rgba(65, 85, 68, 0.5);
}

.after-hours:active {
  transform: scale(0.985);
}

.file-meta {
  margin: 12px 0 0;
  color: #8b8f89;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 10;
  width: calc(100% - 40px);
  max-width: 440px;
  padding: 13px 16px;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  font-size: 13px;
  text-align: center;
  transform: translate(-50%, 150%);
  transition: transform 0.28s ease;
}

.toast.show {
  transform: translate(-50%, 0);
}

@media (min-width: 760px) {
  body {
    padding: 34px;
  }

  .page {
    min-height: calc(100vh - 68px);
    padding: 28px 32px 34px;
    border: 1px solid rgba(39, 51, 43, 0.08);
    border-radius: 32px;
    background: rgba(255, 253, 248, 0.68);
    box-shadow: 0 28px 70px rgba(72, 70, 59, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
