:root {
  --paper: #eee9ed;
  --paper-light: #fbf9fb;
  --paper-deep: #e5dde5;
  --graphite: #49464a;
  --graphite-deep: #383439;
  --plum: #934787;
  --mauve: #c779bd;
  --periwinkle: #777fca;
  --leaf: #17663b;
  --leaf-light: #66a368;
  --hairline: rgba(73, 70, 74, 0.2);
  --serif-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
    Palatino, Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--serif-display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
a {
  color: var(--graphite);
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
}

::selection {
  background: rgba(199, 121, 189, 0.3);
  color: var(--graphite-deep);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--graphite-deep);
  color: #fff;
  font: 700 0.75rem/1 var(--sans);
  letter-spacing: 0.08em;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 5px;
}

.memorial {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}

.section-shell {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}

.eyebrow {
  margin: 0;
  color: var(--leaf);
  font: 700 0.72rem/1.35 var(--sans);
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    radial-gradient(
      circle at 75% 42%,
      rgba(255, 255, 255, 0.86) 0,
      rgba(255, 255, 255, 0.35) 28rem,
      transparent 46rem
    ),
    radial-gradient(
      circle at 8% 82%,
      rgba(199, 121, 189, 0.13),
      transparent 24rem
    ),
    linear-gradient(137deg, #f6f2f5 0%, var(--paper) 57%, #e7e0e7 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: -1;
  border: 1px solid rgba(73, 70, 74, 0.09);
  pointer-events: none;
}

.hero-inner {
  width: min(1180px, calc(100% - 80px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.82fr);
  gap: clamp(58px, 8vw, 116px);
  align-items: center;
  padding: 88px 0 108px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero .eyebrow {
  margin-bottom: 28px;
}

.motto {
  margin: 0 0 28px;
  color: rgba(73, 70, 74, 0.84);
  font-size: clamp(0.89rem, 1.3vw, 1.08rem);
  line-height: 1.6;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(4.4rem, 7.2vw, 7.65rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.058em;
  text-wrap: balance;
}

.life-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  align-items: center;
  margin: 36px 0 0;
  font: 600 0.78rem/1.5 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.life-dates > span {
  color: var(--plum);
}

.dedication {
  max-width: 510px;
  margin: 38px 0 0;
  padding-left: 25px;
  border-left: 1px solid rgba(147, 71, 135, 0.46);
  font-size: clamp(1.08rem, 1.6vw, 1.33rem);
  line-height: 1.7;
}

.portrait-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 465px);
  aspect-ratio: 4 / 5.15;
  margin: 0 auto;
}

.portrait-wrap::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: 20px;
  z-index: -2;
  width: 58%;
  height: 37%;
  border-radius: 50%;
  background: rgba(127, 130, 199, 0.2);
  filter: blur(28px);
}

.portrait-halo {
  position: absolute;
  inset: -23px 19px 22px -19px;
  z-index: -1;
  border: 1px solid rgba(23, 102, 59, 0.25);
  border-radius: 48% 48% 18px 18px;
}

.portrait {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 22%;
  border: 10px solid rgba(251, 249, 251, 0.8);
  border-radius: 50% 50% 13px 13px;
  box-shadow: 0 34px 75px rgba(57, 39, 56, 0.18);
}

.scroll-cue {
  position: absolute;
  bottom: 25px;
  left: 50%;
  z-index: 3;
  display: grid;
  gap: 10px;
  justify-items: center;
  color: rgba(73, 70, 74, 0.7);
  font: 700 0.62rem/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--plum), transparent);
}

.hero-flower {
  position: absolute;
  top: -44px;
  left: -36px;
  z-index: -1;
  width: 250px;
  height: 250px;
  opacity: 0.66;
  transform: rotate(-16deg);
  pointer-events: none;
}

.hero-flower::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 105px;
  width: 78px;
  height: 152px;
  border-right: 7px solid rgba(23, 102, 59, 0.85);
  border-radius: 0 100% 0 0;
  transform: rotate(22deg);
}

.hero-flower::after {
  content: "";
  position: absolute;
  top: 36px;
  left: 77px;
  width: 75px;
  height: 39px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, var(--leaf), var(--leaf-light));
  transform: rotate(-31deg);
}

.petal,
.flower-center {
  position: absolute;
  display: block;
}

.petal {
  top: 82px;
  left: 91px;
  width: 78px;
  height: 126px;
  border-radius: 74% 26% 70% 30%;
  background:
    radial-gradient(
      circle at 68% 28%,
      #dcabd5 0%,
      var(--mauve) 39%,
      var(--plum) 100%
    );
  filter: blur(0.25px);
  transform-origin: 50% 83%;
}

.petal-one {
  transform: rotate(-56deg);
}

.petal-two {
  transform: rotate(-7deg);
}

.petal-three {
  transform: rotate(43deg);
}

.petal-four {
  transform: rotate(93deg);
}

.flower-center {
  top: 160px;
  left: 102px;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #77b075,
    var(--leaf) 72%
  );
}

.botanical {
  position: absolute;
  z-index: 0;
  width: 180px;
  height: 270px;
  opacity: 0.42;
  pointer-events: none;
  transform-origin: 50% 100%;
}

.botanical-stem,
.botanical-leaf {
  position: absolute;
  display: block;
}

.botanical-stem {
  bottom: 4px;
  left: 85px;
  width: 4px;
  height: 245px;
  border-radius: 999px;
  background: linear-gradient(to top, var(--leaf), #469053 72%, transparent);
  transform: rotate(13deg);
  transform-origin: 50% 100%;
}

.botanical-leaf {
  width: 72px;
  height: 38px;
  border-radius: 100% 0 100% 0;
  background:
    linear-gradient(
      19deg,
      transparent 47%,
      rgba(255, 255, 255, 0.3) 48%,
      transparent 51%
    ),
    radial-gradient(circle at 70% 30%, var(--leaf-light), var(--leaf));
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.12);
}

.botanical .leaf-one {
  top: 31px;
  left: 82px;
  transform: rotate(36deg);
}

.botanical .leaf-two {
  top: 99px;
  left: 23px;
  transform: scaleX(-1) rotate(25deg);
}

.botanical .leaf-three {
  top: 160px;
  left: 91px;
  width: 60px;
  height: 32px;
  transform: rotate(30deg);
}

.botanical-hero {
  right: 2.4vw;
  bottom: -55px;
  transform: rotate(-22deg);
}

.remembrance {
  position: relative;
  padding: clamp(110px, 14vw, 190px) 0;
  background:
    linear-gradient(
      90deg,
      rgba(238, 233, 237, 0.43) 1px,
      transparent 1px
    ),
    var(--paper-light);
  background-size: min(9vw, 110px) 100%, auto;
  scroll-margin-top: 24px;
}

.remembrance::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1120px, calc(100% - 64px));
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(147, 71, 135, 0.35),
    transparent
  );
  transform: translateX(-50%);
}

.remembrance-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(360px, 1.1fr);
  gap: clamp(60px, 9vw, 130px);
  align-items: start;
}

.remembrance-heading {
  position: sticky;
  top: 80px;
}

.remembrance-heading .eyebrow {
  margin-bottom: 27px;
}

.remembrance h2 {
  max-width: 510px;
  margin: 0;
  font-size: clamp(3.2rem, 5.7vw, 5.65rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.047em;
  text-wrap: balance;
}

.remembrance-copy {
  padding-top: 50px;
}

.remembrance-copy > p {
  max-width: 630px;
  margin: 0;
  font-size: clamp(1.25rem, 2.15vw, 1.72rem);
  line-height: 1.65;
}

.remembrance-copy > p + p {
  margin-top: 30px;
  color: rgba(73, 70, 74, 0.78);
  font-size: clamp(1.03rem, 1.45vw, 1.2rem);
}

.memory-dates {
  display: grid;
  grid-template-columns: auto 1px auto;
  gap: clamp(26px, 4vw, 54px);
  align-items: center;
  width: fit-content;
  margin-top: 64px;
  padding-top: 35px;
  border-top: 1px solid var(--hairline);
}

.memory-dates time {
  display: grid;
  grid-template-columns: auto auto;
  gap: 12px;
  align-items: end;
}

.memory-dates time > span {
  color: var(--plum);
  font-size: clamp(2.75rem, 4.2vw, 4rem);
  line-height: 0.8;
}

.memory-dates small {
  max-width: 62px;
  font: 700 0.64rem/1.5 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.memory-dates > i {
  width: 1px;
  height: 52px;
  background: var(--hairline);
}

.botanical-remembrance {
  right: -56px;
  bottom: 5%;
  opacity: 0.16;
  transform: scale(1.45) rotate(-39deg);
}

.motto-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(120px, 16vw, 210px) 0;
  background:
    linear-gradient(145deg, rgba(147, 71, 135, 0.36), transparent 48%),
    linear-gradient(120deg, #514550, #413d48 58%, #474456);
  color: #f8f4f7;
  text-align: center;
}

.motto-panel .eyebrow {
  margin-bottom: 38px;
  color: #b7d6b7;
}

.motto-inner {
  position: relative;
  z-index: 2;
}

.motto-inner blockquote {
  margin: 0;
}

.motto-inner blockquote p {
  margin: 0;
  font-size: clamp(3.25rem, 7.8vw, 7.6rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.motto-divider {
  display: block;
  width: 74px;
  height: 1px;
  margin: 48px auto 30px;
  background: linear-gradient(90deg, transparent, var(--mauve), transparent);
}

.motto-note {
  margin: 0;
  color: rgba(248, 244, 247, 0.72);
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  font-style: italic;
  letter-spacing: 0.03em;
}

.motto-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(3px);
  opacity: 0.65;
  pointer-events: none;
}

.motto-orb-one {
  top: -34%;
  left: -9%;
  width: min(44vw, 600px);
  aspect-ratio: 1;
  border: 1px solid rgba(199, 121, 189, 0.34);
  box-shadow:
    inset 0 0 100px rgba(199, 121, 189, 0.08),
    0 0 90px rgba(199, 121, 189, 0.08);
}

.motto-orb-two {
  right: -8%;
  bottom: -55%;
  width: min(48vw, 670px);
  aspect-ratio: 1;
  background: radial-gradient(
    circle,
    rgba(127, 130, 199, 0.27),
    transparent 67%
  );
}

.farewell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(135px, 18vw, 240px) 0;
  background:
    radial-gradient(
      circle at 50% 48%,
      rgba(255, 255, 255, 0.9),
      rgba(255, 255, 255, 0.3) 25rem,
      transparent 44rem
    ),
    linear-gradient(180deg, var(--paper), #f5f1f4);
  text-align: center;
}

.farewell-inner {
  position: relative;
  z-index: 2;
}

.farewell .eyebrow {
  margin-bottom: 32px;
}

.farewell h2 {
  margin: 0;
  font-size: clamp(4rem, 9.2vw, 9rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.farewell-inner > p:last-child {
  margin: 38px 0 0;
  color: rgba(73, 70, 74, 0.77);
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  font-style: italic;
  letter-spacing: 0.025em;
}

.farewell-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: min(70vw, 860px);
  aspect-ratio: 1;
  border: 1px solid rgba(147, 71, 135, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.farewell-ring::before,
.farewell-ring::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(23, 102, 59, 0.09);
  border-radius: 50%;
}

.farewell-ring::before {
  inset: 8%;
}

.farewell-ring::after {
  inset: 19%;
}

.botanical-farewell {
  bottom: -62px;
  left: 4vw;
  opacity: 0.31;
  transform: rotate(24deg) scale(1.08);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 30px max(32px, calc((100vw - 1120px) / 2));
  border-top: 1px solid rgba(73, 70, 74, 0.12);
  background: #ebe5ea;
  color: rgba(73, 70, 74, 0.73);
  font: 700 0.65rem/1.5 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: rise-in 850ms 100ms both cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .portrait-wrap {
    animation: portrait-settle 950ms 180ms both
      cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .botanical {
    animation: gentle-sway 10s ease-in-out infinite alternate;
  }

  .scroll-line {
    animation: pulse-line 2.2s ease-in-out infinite;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes portrait-settle {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gentle-sway {
  from {
    translate: -2px 0;
  }

  to {
    translate: 5px -5px;
  }
}

@keyframes pulse-line {
  0%,
  100% {
    opacity: 0.42;
    transform: scaleY(0.72);
    transform-origin: top;
  }

  50% {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-inner {
    width: min(680px, calc(100% - 48px));
    grid-template-columns: 1fr;
    gap: 74px;
    padding: 126px 0 100px;
  }

  .hero-copy {
    text-align: center;
  }

  .life-dates {
    justify-content: center;
  }

  .dedication {
    margin-inline: auto;
    padding: 0;
    border: 0;
  }

  .portrait-wrap {
    width: min(76vw, 440px);
  }

  .scroll-cue {
    display: none;
  }

  .remembrance-grid {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .remembrance-heading {
    position: static;
  }

  .remembrance-heading,
  .remembrance-copy {
    max-width: 650px;
  }

  .remembrance-copy {
    padding-top: 0;
    margin-left: min(8vw, 70px);
  }

  .botanical-hero {
    right: -50px;
  }
}

@media (max-width: 620px) {
  .section-shell {
    width: min(100% - 38px, 520px);
  }

  .hero::before {
    inset: 12px;
  }

  .hero-inner {
    width: min(100% - 38px, 520px);
    gap: 58px;
    padding: 108px 0 78px;
  }

  .hero .eyebrow {
    margin-bottom: 21px;
  }

  .motto {
    margin-bottom: 22px;
    font-size: 0.76rem;
    letter-spacing: 0.13em;
  }

  .hero h1 {
    font-size: clamp(3.45rem, 18vw, 5.25rem);
    line-height: 0.9;
    letter-spacing: -0.052em;
  }

  .life-dates {
    gap: 8px;
    margin-top: 28px;
    font-size: 0.68rem;
    letter-spacing: 0.09em;
  }

  .dedication {
    margin-top: 28px;
    font-size: 1.02rem;
  }

  .portrait-wrap {
    width: min(84vw, 390px);
  }

  .portrait {
    border-width: 7px;
  }

  .hero-flower {
    top: -56px;
    left: -71px;
    transform: rotate(-20deg) scale(0.78);
  }

  .remembrance {
    padding: 102px 0;
    background-size: 23vw 100%, auto;
  }

  .remembrance h2 {
    font-size: clamp(3.1rem, 14vw, 4.6rem);
  }

  .remembrance-copy {
    margin-left: 0;
  }

  .remembrance-copy > p {
    font-size: 1.22rem;
  }

  .remembrance-copy > p + p {
    font-size: 1rem;
  }

  .memory-dates {
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
    margin-top: 48px;
  }

  .memory-dates > i {
    width: 100%;
    height: 1px;
  }

  .motto-panel {
    padding: 120px 0;
  }

  .motto-inner blockquote p {
    font-size: clamp(3.05rem, 15vw, 4.8rem);
    line-height: 0.93;
  }

  .motto-divider {
    margin-top: 36px;
  }

  .farewell {
    padding: 138px 0;
  }

  .farewell h2 {
    font-size: clamp(4.1rem, 20vw, 6.2rem);
  }

  .farewell-ring {
    width: 116vw;
  }

  .site-footer {
    display: grid;
    justify-content: center;
    padding: 28px 20px;
    text-align: center;
  }
}

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

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

@media print {
  @page {
    margin: 16mm;
  }

  html,
  body {
    background: #fff;
    color: #2e2b2f;
  }

  .skip-link,
  .scroll-cue,
  .hero-flower,
  .botanical,
  .motto-orb,
  .farewell-ring {
    display: none !important;
  }

  .memorial {
    overflow: visible;
    background: #fff;
  }

  .hero,
  .remembrance,
  .motto-panel,
  .farewell {
    min-height: auto;
    padding: 18mm 0;
    background: #fff;
    color: #2e2b2f;
    break-inside: avoid;
  }

  .hero::before,
  .remembrance::before {
    display: none;
  }

  .hero-inner {
    width: 100%;
    grid-template-columns: 1.1fr 0.7fr;
    gap: 14mm;
    padding: 0;
  }

  .hero h1 {
    font-size: 48pt;
  }

  .portrait-wrap {
    width: 66mm;
  }

  .portrait {
    border: 2mm solid #f3eff2;
    box-shadow: none;
  }

  .portrait-wrap::after {
    display: none;
  }

  .remembrance-grid {
    width: 100%;
    grid-template-columns: 0.8fr 1.1fr;
    gap: 14mm;
  }

  .remembrance-heading {
    position: static;
  }

  .remembrance-copy {
    padding-top: 0;
  }

  .motto-panel .eyebrow {
    color: var(--leaf);
  }

  .motto-inner blockquote p {
    font-size: 43pt;
  }

  .motto-note {
    color: #4a464a;
  }

  .farewell h2 {
    font-size: 54pt;
  }

  .site-footer {
    padding: 8mm 0 0;
    background: #fff;
  }
}
