@font-face {
  font-family: "Caveat Memorial";
  src: url("assets/memorial/fonts/Caveat[wght].ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Allura Memorial";
  src: url("assets/memorial/fonts/Allura-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Mrs Saint Memorial";
  src: url("assets/memorial/fonts/MrsSaintDelafield-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.memorial-footer {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: max(941px, 100svh);
  min-height: 941px;
  overflow: hidden;
  background-color: #332b1c;
  background-image: url("assets/memorial/backdrops/footer-backdrop.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: #19140e;
  font-family: "Times New Roman", Times, serif;
}

.footer-lockup {
  position: absolute;
  top: 13.85%;
  left: 35.75%;
  width: 330px;
  text-align: center;
  transform: rotate(-2deg);
}

.footer-script {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  color: #1d170f;
  font-family: "Mrs Saint Memorial", "Brush Script MT", cursive;
  font-size: clamp(56px, 5.02vw, 84px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.85;
  text-shadow: 0 1px 0 rgba(255, 216, 148, 0.22);
}

.footer-script span:first-child { padding-left: 6px; }
.footer-script span:last-child { padding-left: 4px; white-space: nowrap; }

.footer-script-underline {
  position: absolute;
  top: 153px;
  left: 4px;
  width: 296px;
  height: 20px;
  border-bottom: 2px solid #21180e;
  border-radius: 0 0 50% 44%;
  transform: rotate(-5deg);
}

.footer-script-underline::after {
  position: absolute;
  right: 28px;
  bottom: -7px;
  width: 205px;
  border-bottom: 1px solid rgba(36, 26, 15, 0.85);
  content: "";
  transform: rotate(2deg);
}

.footer-heart {
  position: absolute;
  top: 164px;
  left: 137px;
  width: 48px;
  height: 42px;
  transform: rotate(-3deg);
}

.footer-name {
  margin: 66px 0 0;
  color: #1e180f;
  font-size: clamp(17px, 1.25vw, 21px);
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(24px);
}

.footer-name-rule {
  display: block;
  width: 200px;
  height: 1px;
  margin: 10px auto 0;
  background: rgba(32, 24, 14, 0.82);
}

.footer-motto {
  position: absolute;
  top: 8.15%;
  right: 8.5%;
  width: max-content;
  margin: 0;
  color: #21180f;
  font-family: "Caveat Memorial", "Brush Script MT", cursive;
  font-size: clamp(19px, 1.38vw, 23px);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.08;
  text-shadow: 0 1px rgba(255, 220, 165, 0.55), 0 0 3px rgba(236, 192, 121, 0.28);
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-6deg);
}

.footer-motto::after {
  position: absolute;
  right: 7px;
  bottom: -15px;
  width: 157px;
  height: 11px;
  border-bottom: 2px solid #231a10;
  border-radius: 0 0 50% 0;
  content: "";
  transform: rotate(-2deg);
}

.footer-tiles {
  position: absolute;
  z-index: 5;
  top: 46.76%;
  left: 45.75%;
  display: grid;
  width: 51.62%;
  height: 30.18%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 0.84vw, 15px);
}

.footer-tile {
  position: relative;
  display: block;
  min-width: 0;
  height: 100%;
  color: #17120c;
  text-align: center;
  text-decoration: none;
  filter: drop-shadow(0 4px 3px rgba(21, 14, 7, 0.42));
  transition: transform 180ms ease, filter 180ms ease;
}

.footer-tile:hover {
  z-index: 3;
  filter: drop-shadow(0 8px 6px rgba(21, 14, 7, 0.5));
  transform: translateY(-4px);
}

.footer-tile:focus-visible {
  z-index: 4;
  outline: 3px solid #f6db9f;
  outline-offset: 3px;
}

.footer-tile__wood {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.footer-tile__art {
  position: absolute;
  z-index: 1;
  top: 6%;
  left: 18%;
  width: 64%;
  height: 41%;
  object-fit: contain;
  filter: drop-shadow(0 2px 1px rgba(31, 20, 10, 0.28));
  pointer-events: none;
}

.footer-tile__art--fish { width: 63%; height: 42%; top: 6%; transform: rotate(-25deg); }
.footer-tile__art--microphone { width: 50%; height: 43%; top: 5%; left: 25%; filter: none; }
.footer-tile__art--upload { width: 65%; height: 39%; top: 8%; left: 17.5%; }

.footer-tile__title,
.footer-tile__caption,
.footer-tile__arrow {
  position: absolute;
  z-index: 2;
  left: 5%;
  width: 90%;
}

.footer-tile__title {
  top: 55.4%;
  font-size: clamp(14px, 1.48vw, 25px);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.footer-tile__title--small { font-size: clamp(12px, 1.12vw, 19px); }

.footer-tile__caption {
  top: 67%;
  font-family: "Caveat Memorial", "Brush Script MT", cursive;
  font-size: clamp(19px, 1.62vw, 27px);
  font-weight: 500;
  line-height: 0.86;
}

.footer-tile__arrow {
  top: 87.5%;
  left: 41%;
  width: 18%;
  height: 9%;
}

.footer-photo-stack {
  position: absolute;
  z-index: 1;
  top: 8%;
  left: 21%;
  width: 58%;
  height: 42%;
  filter: drop-shadow(0 2px 1px rgba(31, 20, 10, 0.28));
}

.footer-photo {
  position: absolute;
  display: block;
  width: 57%;
  height: 80%;
  border: 5px solid #eee4cc;
  border-bottom-width: 16px;
  background-image: url("assets/memorial/backdrops/footer-backdrop.png");
  background-repeat: no-repeat;
  background-size: 550% auto;
  box-shadow: 0 1px 3px rgba(34, 23, 13, 0.7);
}

.footer-photo--back {
  top: 5%;
  left: 17%;
  background-position: 68% 59%;
  transform: rotate(10deg);
}

.footer-photo--front {
  top: 9%;
  left: 30%;
  background-position: 52% 62%;
  transform: rotate(-8deg);
}

.footer-wood-banner {
  position: absolute;
  z-index: 3;
  bottom: 3.8%;
  left: 0;
  display: flex;
  width: 75.36%;
  height: 9.78%;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 28% 38%, rgba(218, 169, 111, 0.24), transparent 45%),
    repeating-linear-gradient(178deg, transparent 0 8px, rgba(35, 20, 10, 0.26) 9px 10px, transparent 11px 18px),
    linear-gradient(180deg, #4c301d 0%, #785234 17%, #68462b 47%, #492d1b 74%, #2e1d12 100%);
  border-top: 5px solid rgba(30, 20, 13, 0.68);
  border-bottom: 5px solid rgba(26, 17, 11, 0.85);
  box-shadow: 0 8px 10px rgba(10, 9, 6, 0.3), inset 0 2px 5px rgba(226, 182, 125, 0.26), inset 0 -5px 9px rgba(13, 8, 4, 0.37);
  clip-path: polygon(0 4%, 1.1% 0, 99.2% 2%, 100% 7%, 99.4% 91%, 98.8% 100%, 0 96%);
}

.footer-wood-banner::before,
.footer-wood-banner::after {
  position: absolute;
  right: 0;
  left: 0;
  content: "";
}

.footer-wood-banner::before {
  inset: 0;
  background: url("assets/memorial/generated/wood-tile.png") center 55% / 430% 320% no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.55;
  pointer-events: none;
}

.footer-wood-banner::after {
  bottom: 26%;
  height: 1px;
  background: rgba(219, 174, 120, 0.27);
}

.footer-wood-banner p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #f6e4c5;
  font-family: "Caveat Memorial", "Brush Script MT", cursive;
  font-size: clamp(25px, 2.15vw, 36px);
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 2px 2px rgba(21, 12, 6, 0.85);
  transform: translateX(205px);
  white-space: nowrap;
}

.footer-ornaments {
  position: absolute;
  z-index: 4;
  right: -6.8%;
  bottom: -8.5%;
  width: 25.2%;
  height: auto;
  pointer-events: none;
}

.footer-stone-words {
  position: absolute;
  z-index: 6;
  top: 81.5%;
  right: 1.35%;
  width: 9.7%;
  margin: 0;
  color: #29241d;
  font-size: clamp(12px, 1.03vw, 17px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.12;
  text-align: center;
  text-shadow: 0 1px rgba(207, 199, 180, 0.7);
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.footer-tree-mark {
  position: absolute;
  z-index: 6;
  top: 92.2%;
  right: 5.55%;
  width: 23px;
  height: 25px;
  opacity: 0.88;
}

@media (max-width: 900px) {
  .memorial-footer {
    height: auto;
    min-height: 1140px;
    padding: 36px 16px 250px;
    background-size: auto 100%;
    background-position: 31% center;
  }

  .footer-lockup {
    position: relative;
    top: auto;
    left: auto;
    width: min(100%, 320px);
    margin: 0 auto;
    transform: rotate(-2deg);
  }

  .footer-script { align-items: center; font-size: clamp(58px, 16vw, 76px); }
  .footer-script span:first-child,
  .footer-script span:last-child { padding-left: 0; }
  .footer-script-underline { top: 145px; left: 9%; width: 82%; }
  .footer-script-underline::after { right: 6%; width: 65%; }
  .footer-heart { top: 160px; left: calc(50% - 22px); }
  .footer-name { margin-top: 100px; font-size: 18px; transform: none; }
  .footer-name-rule { width: 180px; }

  .footer-motto {
    position: relative;
    top: auto;
    right: auto;
    width: max-content;
    max-width: 100%;
    margin: 35px 0 0 auto;
    font-size: 23px;
    text-align: right;
  }

  .footer-tiles {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    margin: 38px auto 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .footer-tile { height: auto; aspect-ratio: 205 / 284; }
  .footer-tile__title { font-size: clamp(16px, 5vw, 21px); }
  .footer-tile__title--small { font-size: clamp(13px, 4vw, 17px); }
  .footer-tile__caption { font-size: clamp(21px, 6vw, 28px); }
  .footer-wood-banner {
    bottom: 135px;
    width: 100%;
    height: 84px;
    padding-inline: 10px;
  }

  .footer-wood-banner p { margin: 0; font-size: clamp(22px, 6.5vw, 33px); text-align: center; transform: none; white-space: normal; }
  .footer-ornaments { right: -18%; bottom: -1%; width: 66%; }
  .footer-stone-words { top: auto; right: 3%; bottom: 24px; width: 28%; font-size: 11px; }
  .footer-tree-mark { top: auto; right: 13%; bottom: 6px; width: 20px; }
}

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


.footer-motto {
  z-index: 2;
  top: 7.4%;
  left: 80.15%;
  right: auto;
  font-size: clamp(22px, 1.92vw, 32px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.02em;
}
.footer-motto::before {
  position: absolute;
  z-index: -1;
  inset: -24px -28px;
  background: radial-gradient(ellipse, rgb(255 231 181 / 86%) 15%, rgb(255 231 181 / 55%) 55%, transparent 76%);
  filter: blur(9px);
  content: "";
  pointer-events: none;
}
.footer-tile__brush { position: absolute; z-index: 1; top: 5%; left: 11%; width: 78%; height: 49%; pointer-events: none; }
.footer-tile__art, .footer-photo-stack { z-index: 2; }
.footer-tile::before { position: absolute; z-index: 2; inset: 1% 2%; border: 1px solid rgb(57 37 19 / 70%); clip-path: polygon(0 1%, 22% 0, 56% 2%, 100% 0, 99% 35%, 100% 72%, 98% 100%, 55% 99%, 25% 100%, 1% 98%, 0 61%, 1% 28%); content: ""; pointer-events: none; }
.footer-tile__nails { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.footer-tile__nails i { position: absolute; width: 5px; height: 5px; border: 1px solid #382518; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #bea482, #4e3925 65%); box-shadow: 0 1px 1px #24180c; }
.footer-tile__nails i:nth-child(1) { left: 6%; top: 6%; }
.footer-tile__nails i:nth-child(2) { right: 6%; top: 6%; }
.footer-tile__nails i:nth-child(3) { left: 6%; bottom: 6%; }
.footer-tile__nails i:nth-child(4) { right: 6%; bottom: 6%; }
.footer-photo--back { left: 12%; top: 2%; transform: rotate(-16deg); }
.footer-photo--middle { left: 36%; top: 6%; background-position: 63% 54%; transform: rotate(14deg); }
.footer-photo--front { left: 25%; top: 9%; transform: rotate(-7deg); }
.footer-wood-banner { top: 86.61%; bottom: auto; left: 14.66%; width: 62.8%; height: 9.03%; border-top-width: 2px; border-bottom-width: 3px; }
.footer-wood-banner p { transform: none; font-weight: 400; }
@media(max-width:1100px) and (min-width:901px) {
  .footer-motto { left: auto; right: 4%; font-size: clamp(23px, 2.6vw, 28px); }
  .footer-wood-banner { left: 10%; width: 77%; }
}
@media(max-width:900px) {
  .footer-motto { left: auto; top: auto; right: auto; font-size: 25px; }
  .footer-wood-banner { top: auto; bottom: 135px; left: 0; width: 100%; height: 84px; }
  .footer-name { margin-top: 100px; }
}
@media(min-width:1101px) { .footer-tiles { left: 45.93%; width: 50.6%; } }
.footer-tile__caption { font-weight: 400; }

.footer-script { font-style: italic; }
@media(min-width:1101px) { .footer-wood-banner p { transform: translateX(60px); } }

/* The independent timber artwork supplies the banner silhouette and grain. */
.footer-wood-banner { background:transparent; border:0; box-shadow:none; clip-path:none; }
.footer-wood-banner::before { background:url("assets/memorial/generated/footer-log.png") center / 100% 100% no-repeat; opacity:1; mix-blend-mode:normal; filter:brightness(.58) saturate(.8); }
.footer-wood-banner::after { display:none; }
.footer-wood-banner p { font-weight:400; }

/* Thin flowing lettering more closely matches the handwritten reference. */
.footer-script { font-family:"Mrs Saint Memorial","Brush Script MT",cursive; font-style:normal; letter-spacing:0; }
.footer-tile__caption { font-family:"Allura Memorial","Brush Script MT",cursive; font-size:clamp(22px,1.72vw,29px); font-style:normal; font-weight:400; line-height:.9; }
.footer-wood-banner p { font-family:"Allura Memorial","Brush Script MT",cursive; font-size:clamp(25px,2vw,34px); font-style:normal; font-weight:400; line-height:1; }
.footer-family-photo { display:none; }
@media(min-width:1101px) {
 .memorial-footer { min-height:0; height:56.28vw; }
 .footer-lockup { width:19.74vw; }
 .footer-script-underline { top:9.15vw; width:17.7vw; height:1.2vw; }
 .footer-heart { top:9.8vw; left:8.19vw; width:2.87vw; height:2.51vw; }
 .footer-name { margin-top:3.94vw; font-size:1.25vw; transform:translateX(1.43vw); }
 .footer-name-rule { width:11.96vw; }
}
@media(max-width:900px) {
 .memorial-footer { background-position:right center; }
 .footer-family-photo { display:block; width:calc(100% + 32px); max-width:none; height:auto; margin:28px -16px 0; }
 .footer-tiles { margin-top:20px; }
 .footer-script-underline { top:128px; }
 .footer-heart { top:143px; }
 .footer-name { margin-top:80px; }
 .footer-stone-words { bottom:30px; }
}
@media(max-width:900px) {
 .footer-lockup { isolation:isolate; }
 .footer-lockup::before { position:absolute; z-index:-1; inset:-18px -25px; background:radial-gradient(ellipse,#ffe5b8 10%,rgb(255 227 174 / 94%) 58%,transparent 76%); content:""; filter:blur(8px); }
 .footer-family-photo { width:100%; max-width:100%; margin:28px 0 0; border:6px solid #ebd4aa; box-shadow:0 4px 12px #30221880; }
}

/* Keep the approved family image in the tablet composition too; the desktop
   cover crop removes Steve's face at these widths. */
@media (max-width: 1100px) and (min-width: 901px) {
  .memorial-footer {
    box-sizing: border-box;
    height: auto;
    min-height: 0;
    padding: 36px 24px 260px;
    background-size: auto 100%;
    background-position: right center;
  }

  .footer-lockup {
    position: relative;
    top: auto;
    left: auto;
    isolation: isolate;
    width: min(100%, 360px);
    margin: 0 auto;
    transform: rotate(-2deg);
  }

  .footer-lockup::before {
    position: absolute;
    z-index: -1;
    inset: -18px -25px;
    background: radial-gradient(ellipse, #ffe5b8 10%, rgb(255 227 174 / 94%) 58%, transparent 76%);
    content: "";
    filter: blur(8px);
    pointer-events: none;
  }

  .footer-script { align-items: center; font-size: clamp(66px, 7.2vw, 78px); }
  .footer-script span:first-child,
  .footer-script span:last-child { padding-left: 0; }
  .footer-script-underline { top: 136px; left: 9%; width: 82%; }
  .footer-heart { top: 151px; left: calc(50% - 22px); }
  .footer-name { margin-top: 112px; font-size: 18px; transform: none; }
  .footer-name-rule { width: 200px; }
  .footer-motto {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: max-content;
    max-width: 100%;
    margin: 36px 0 0 auto;
    font-size: clamp(24px, 2.5vw, 28px);
    text-align: right;
  }

  .footer-family-photo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 28px auto 0;
    border: 6px solid #ebd4aa;
    box-shadow: 0 4px 12px #30221880;
  }

  .footer-tiles {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    margin: 26px auto 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .footer-tile { height: auto; aspect-ratio: 205 / 284; }
  .footer-tile__title { font-size: clamp(18px, 2.2vw, 23px); }
  .footer-tile__title--small { font-size: clamp(14px, 1.8vw, 18px); }
  .footer-tile__caption { font-size: clamp(24px, 3vw, 32px); }
  .footer-wood-banner { top: auto; bottom: 145px; left: 0; width: 100%; height: 86px; }
  .footer-wood-banner p { font-size: clamp(27px, 3.2vw, 34px); text-align: center; transform: none; white-space: normal; }
  .footer-ornaments { right: -18%; bottom: -1%; width: 66%; }
  .footer-stone-words { top: auto; right: .5%; bottom: 42px; width: 27%; font-size: 12px; }
  .footer-tree-mark { top: auto; right: 12%; bottom: 15px; width: 21px; }
}

/* Place the memorial words over the clear stone face instead of the flowers. */
.footer-stone-words {
  top: auto;
  right: .5%;
  bottom: 4.8%;
  width: 12%;
  min-width: 150px;
  font-size: clamp(12px, 1.03vw, 17px);
  color: #211b13;
  text-shadow: 0 1px 0 #e5ddc9, 0 -1px 0 rgba(34, 27, 18, .24);
}

.footer-stone-words::before {
  position: absolute;
  z-index: -1;
  inset: -8px -12px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(231, 223, 202, .96) 0%, rgba(224, 216, 193, .83) 58%, rgba(224, 216, 193, 0) 100%);
  content: "";
  filter: blur(2px);
  pointer-events: none;
}

@media (max-width: 900px) {
  .footer-name { margin-top: 92px; }
  .footer-stone-words {
    right: .5%;
    bottom: 88px;
    width: 28%;
    min-width: 0;
    font-size: 12px;
  }
}

@media (min-width: 1101px) {
  .footer-name { margin-top: calc(3.94vw + 12px); }
}

/* The footer fills at least one viewport, while stacked layouts may grow. */
.memorial-footer { min-height: 100svh; }

@media (max-width: 900px) {
  .memorial-footer { min-height: max(100svh, 1140px); }
}
