@import url("fonts.css");
:root { color-scheme: dark; font-family: "Iconic", serif; color: #e1ca87; background: #1c231f; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: #1c231f; }
main { width: 100%; overflow: hidden; }
.memorial { position: relative; isolation: isolate; max-width: 1200px; margin: auto; padding: clamp(56px, 9svh, 104px) 5% 20px; background: radial-gradient(ellipse at 25% 30%, #a38b3920, transparent 30%), radial-gradient(ellipse at 76% 36%, #a38b391c, transparent 30%); }
.memorial::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(circle at 8% 7%, white 0 1px, transparent 1.5px),radial-gradient(circle at 34% 3%, white 0 1px, transparent 2px),radial-gradient(circle at 91% 11%, white 0 1px, transparent 1.5px),radial-gradient(circle at 54% 96%, white 0 2px, transparent 2.5px); animation: stars 5s ease-in-out infinite alternate; }
.portraits { display: grid; grid-template-columns: 1fr 1fr; gap: 12%; align-items: end; }
.royal { margin: 0; min-width: 0; text-align: center; }
.portrait { position: relative; height: clamp(190px, 48svh, 520px); }
.portrait::before { content: ""; position: absolute; inset: 15% -12% -6%; z-index: -1; background: radial-gradient(ellipse, #d6ad4966, transparent 60%); }
.portrait::after { content: ""; position: absolute; inset: 48% -20% -2%; z-index: -1; opacity: .13; background: url("images/mist.png") center top / 100% auto no-repeat; }
.portrait svg { display: block; height: 100%; width: 100%; overflow: hidden; filter: saturate(.65); }

figcaption { position: relative; margin: 4px -5% 0; padding: 4px 15px; font-size: clamp(12px, 1.35vw, 19px); line-height: 1.5; background: linear-gradient(180deg, #ffffff08, transparent); border-inline: 1px solid #bcaa69; text-shadow: 0 2px 3px #000; }
.tribute { text-align: center; margin-top: 8px; text-shadow: 0 4px 4px #000; }
h1 { font-size: clamp(27px, 3vw, 42px); line-height: 1.4; margin: 0; color: #e2cb83; }
.tribute p { font-size: clamp(18px, 2.1vw, 29px); margin: 2px 0 0; }
.divider { display: flex; align-items: center; gap: 12px; width: 48%; margin: 4px auto; font-size: 20px; color: #c2b47c; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, #c2b47c, transparent); }
.organization { text-align: center; color: white; }
.dedication { font-style: italic; font-size: clamp(16px, 1.7vw, 23px); line-height: 1.6; margin: 1px 0; overflow-wrap: anywhere; }
.org-actions { display: flex; justify-content: center; gap: 14px; margin: 10px auto 0; }
.org-actions a {
  flex: 0 1 190px; width: 190px; min-height: 40px;
  padding: 7px 20px; border: 1px solid #bca673; border-radius: 7px;
  background: linear-gradient(145deg, #343b30, #202720);
  box-shadow: inset 0 1px 0 #fff3c112, 0 3px 10px #0002;
  color: #ead9ac; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.3;
  letter-spacing: .02em;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.org-actions a::after { content: none; }
.org-actions a[href]:hover {
  filter: none; border-color: #ead9ac;
  background: linear-gradient(145deg, #454a37, #2a3127);
  box-shadow: inset 0 1px 0 #fff3c120, 0 3px 12px #0003;
}
.org-actions a[href]:active { background: #1b221c; }
.org-actions a:focus-visible { outline: 2px solid #ead9ac; outline-offset: 4px; }
.org-actions a[aria-disabled="true"] { cursor: default; }
.org-details { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 28px auto 0; max-width: 900px; }
#org-logo { width: 80px; height: 80px; object-fit: contain; }
.org-copy { overflow-wrap: anywhere; }
.org-copy h2 { font-size: 22px; color: #e1ca87; margin: 0; }
.org-copy p { margin: 3px 0; white-space: pre-wrap; }
[hidden] { display: none !important; }
@keyframes stars { from { opacity: .35; } to { opacity: .9; } }

#memorial-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.memorial > :not(canvas) { position: relative; z-index: 1; }
.canvas-ready .portrait svg { visibility: hidden; }
.canvas-ready .portrait::before, .canvas-ready .portrait::after, .canvas-ready.memorial::before { display: none; }
.portrait .royal-emblem { position: absolute; top: 8px; height: 32%; max-height: 100px; width: auto; filter: none; }
.portrait .emblem-queen { left: 5%; aspect-ratio: 1 / 2; }
.portrait .emblem-princess { right: 5%; aspect-ratio: 2 / 3; }
@media(max-width: 600px) {
  .memorial { padding-top: clamp(48px, 8svh, 76px); }
  .portraits { gap: 7%; }
  .portrait { height: clamp(170px, 39svh, 330px); }
  figcaption { padding-inline: 4px; font-size: 12px; }
  h1 { font-size: clamp(24px, 6.6vw, 32px); }
  .tribute p { font-size: clamp(17px, 4.5vw, 21px); }
  .dedication { font-size: 16px; }
  .divider { width: 70%; }
  .org-actions { gap: 10px; }
  .org-actions a { flex: 0 1 155px; width: 46%; min-height: 38px; padding: 7px 10px; font-size: 16px; }
  .org-details { flex-direction: column; }
}
@media(min-width: 601px) and (max-height: 650px) {
  .portrait { height: 42svh; }
  h1 { font-size: 28px; }
  .tribute p { font-size: 20px; }
  .dedication { font-size: 17px; }
}
@media(max-width: 360px) and (max-height: 650px) {
  .portrait { height: 165px; }
  figcaption { font-size: 11px; line-height: 1.4; }
  h1 { font-size: 22px; }
  .tribute { margin-top: 6px; }
  .tribute p { font-size: 16px; }
  .dedication { font-size: 14px; }
  .org-actions a { min-height: 36px; font-size: 15px; }
}
@media(prefers-reduced-motion: reduce) {
  .memorial::before { animation: none; }
  .org-actions a { transition: none; }
}

/* Ornamental gold plaques, drawn as a lightweight reusable vector. */
.org-actions { gap: clamp(12px, 2vw, 24px); }
.org-actions a {
  flex: 0 1 290px; width: 290px; min-height: 64px;
  padding: 16px 36px; border: 0; border-radius: 0;
  background: url("images/gold-button.svg") center / 100% 100% no-repeat;
  color: #513508; font-size: clamp(20px, 1.8vw, 25px);
  font-weight: 600; letter-spacing: 0; text-decoration: none;
  text-shadow: 0 1px 0 #fff2b8; box-shadow: none;
  filter: drop-shadow(0 3px 5px #0004);
  transition: filter .2s ease, transform .2s ease;
}
.org-actions a[href]:hover {
  background: url("images/gold-button.svg") center / 100% 100% no-repeat;
  box-shadow: none; filter: brightness(1.1) drop-shadow(0 4px 7px #0005);
  transform: translateY(-2px);
}
.org-actions a[href]:active { transform: translateY(0); filter: brightness(.96); background: url("images/gold-button.svg") center / 100% 100% no-repeat; }
.org-actions a:focus-visible { outline: 2px solid #fff0ba; outline-offset: 3px; border-radius: 18px; }
@media(max-width: 600px) {
  .org-actions { gap: 8px; }
  .org-actions a { flex: 0 1 200px; width: 48%; min-height: 54px; padding: 14px 20px; font-size: 18px; }
}
@media(max-width: 360px) { .org-actions a { font-size: 16px; padding-inline: 18px; } }
@media(prefers-reduced-motion: reduce) {
  .org-actions a { transition: none; }
  .org-actions a[href]:hover { transform: none; }
}
