/* 2.8 — shared interaction rules, readable dialogs and stable service cards. */
.aof-hero .hero-bottom{flex-wrap:wrap}
.aof-hero .hero-bottom>a{display:inline-flex;align-items:center;justify-content:flex-start;width:max-content;max-width:100%;min-height:44px;flex:0 0 auto;gap:14px;font-size:12px;line-height:1.5;white-space:nowrap}
.aof-hero .hero-bottom>a>span{display:inline-grid;place-items:center;flex:0 0 36px;width:36px;height:36px;aspect-ratio:1;border-radius:50%}
.step-photo{position:relative;width:100%;max-width:320px;aspect-ratio:var(--portrait-ratio,1 / 1);margin:0 auto 24px;overflow:hidden;border:1px solid #b6c4ad80;border-radius:18px;background:#e2e8dc;box-shadow:inset 0 1px #fff5,0 8px 20px #001b151c}
.deep .step-photo{background:#153e30;border-color:#e1cea060}
html .step-photo>img{display:block;position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:var(--portrait-fit,contain);object-position:var(--portrait-x,50%) var(--portrait-y,50%);transform:scale(var(--portrait-scale,1))!important;transform-origin:var(--portrait-x,50%) var(--portrait-y,50%);scale:1!important}
.aof-cursor-halo,.aof-click-pulse{position:fixed;inset:auto;margin:0;padding:0;border:0;overflow:visible;z-index:2147483646;pointer-events:none!important;border-radius:50%;contain:layout style;mix-blend-mode:normal}
.aof-cursor-halo::backdrop,.aof-click-pulse::backdrop{display:none}
.aof-cursor-halo{width:var(--cursor-size,38px);height:var(--cursor-size,38px);transform:translate(-50%,-50%);background:radial-gradient(circle,#ebce8638 0,#91c5ae30 36%,transparent 72%);filter:drop-shadow(0 0 5px #dcebd57a)}
.aof-cursor-halo.is-action{background:radial-gradient(circle,#f3df9d65 0,#bbd8aa42 36%,transparent 72%);filter:drop-shadow(0 0 8px #dcebd5a0)}
.aof-cursor-halo[hidden]{display:none!important}.aof-click-pulse{width:62px;height:62px;background:radial-gradient(circle,transparent 28%,#f2d8959c 43%,#a7cdb666 55%,transparent 72%)}
:is(a,button,summary,input,select,textarea):focus-visible{outline:3px solid #a87e2e;outline-offset:5px}
.aof-header .menu-toggle{background:#143d31;border-color:#d4bc7c;border-radius:12px;box-shadow:inset 0 1px #ffffff40,0 4px 0 #001c1470;color:#f0db9c}
.aof-header .menu-toggle>span:not(.sr-only){background:#f0db9c}
.menu-toggle[aria-expanded=true]>span:first-child{transform:translateY(4px) rotate(45deg)}
.menu-toggle[aria-expanded=true]>span:nth-child(2){transform:translateY(-4px) rotate(-45deg)}
@media(prefers-reduced-motion:reduce),(hover:none){.aof-cursor-halo,.aof-click-pulse{display:none!important}}
.profile-dialog{overflow:hidden!important;padding:0;max-height:calc(100dvh - 32px);width:min(1000px,calc(100vw - 32px))}
.profile-dialog .profile-panel{max-height:calc(100dvh - 36px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0}
.profile-dialog>.profile-close{position:absolute;z-index:10;top:12px;right:12px;background:#12392f;color:#ffebac;width:44px;height:44px;box-shadow:0 3px 14px #00180f88}
.profile-dialog .profile-panel>.profile-close{position:sticky;top:12px;justify-self:end;z-index:10}
.memorial-profile-dialog .profile-panel{grid-template-columns:minmax(180px,.65fr) minmax(0,1.35fr);gap:30px;padding:64px 32px 36px;align-items:start}
.memorial-profile-dialog .profile-story{min-width:0;padding:0}
.legacy-names .profile-dialog .profile-story p:not(.eyebrow),.profile-dialog .profile-biography p{max-width:none;font-size:16px;line-height:1.8;color:#edf1e8;margin:0 0 1.15em}
.profile-dialog .profile-story h2{font-size:clamp(28px,3vw,42px);line-height:1.16;overflow-wrap:break-word;margin:12px 0 22px}
.memorial-profile-dialog .profile-visual{display:flex;flex-direction:column;min-height:0;max-height:none;aspect-ratio:auto;padding:0;border-radius:18px;overflow:hidden;align-self:start;background:#214738}
html .memorial-profile-dialog .profile-visual img{display:block;position:static;width:100%;height:auto;max-height:420px;object-fit:contain}
.memorial-profile-dialog .profile-monogram{font-size:90px;padding:36px;line-height:1.4}
.reference-image-label{display:block;font:500 11px/1.5 var(--sans);letter-spacing:.03em;color:#efe3c7;text-align:center;padding:8px 12px}
.profile-dates{gap:20px;flex-wrap:wrap;margin:20px 0}.profile-dates time{font-size:17px}.profile-dates span{font-size:12px}
.combined-scroll{display:flex;flex-direction:column;inset:88px 0 100px}.combined-stage{margin:auto;width:min(1040px,100%);padding:24px 16px 28px;transform:none!important;transition:none}
.combined-person{min-width:0;padding:24px;display:flex;flex-direction:column;align-items:center}
.combined-person .draw-name{height:77px;flex-shrink:0;display:flex;align-items:center;justify-content:center;line-height:1}
.combined-person .draw-name .name-art{display:block}
.combined-person .combined-portrait{position:relative;inset:auto;flex:none;width:clamp(144px,24dvh,224px);max-width:100%;height:auto;aspect-ratio:4 / 5;margin:0 auto 12px;border-radius:16px;overflow:hidden;opacity:1;mask-image:none;background:#0c2b22}
/* Uploaded portrait proportions must not be replaced by theme/Elementor auto-height
   or site-wide cover/zoom defaults. Keep the entire approved photograph visible. */
html .memorial-combined .combined-person .combined-portrait img{display:block;position:absolute;inset:0;width:100%!important;height:100%!important;max-width:100%;max-height:100%;object-fit:contain!important;object-position:center!important;transform:none!important;scale:1!important;animation:none!important}
.combined-fullname{font-size:clamp(17px,1.8vw,23px);line-height:1.4;min-height:2.8em}
.combined-note{font-size:14px;line-height:1.6;min-height:3.2em}.combined-dates{margin-top:auto}.combined-dates time{font-size:15px}.combined-person .name-art{height:65px}
.combined-remembrance{margin-top:24px}.combined-remembrance>p{font-size:16px}
.combined-remembrance[hidden],.memorial-enter[hidden]{display:none!important}
.memorial-enter{position:absolute;z-index:5;left:50%;bottom:24px;translate:-50% 0;max-width:calc(100% - 32px);min-height:46px;margin:0;text-align:center;white-space:normal}
.combined-controls{right:auto;max-width:calc(50% - 180px)}
.combined-controls [data-intro-status]{max-width:160px}
.cause-card>.card-link{font-size:14px;line-height:1.5;min-height:64px;gap:12px;align-items:center}
.cause-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;align-items:start}
.cause-grid>.cause-card{rotate:none!important;translate:none!important;align-self:start}
.cause-card .cause-body{flex:none}
.step-grid.service-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:32px}
.service-card-grid>.step-card{align-self:start}
.step-copy{min-width:0}.step-copy>p:not(.eyebrow){margin-bottom:24px}.step-copy>.step-icon{display:grid;width:48px}
.service-card-grid>.step-card>.mission-services{margin-top:0;margin-bottom:0}
.service-reveal>.card-link,.cause-card .service-reveal>.card-link{font-size:14px;line-height:1.5;min-height:52px;margin:16px 0 0;gap:12px}
.legacy-names{grid-template-columns:minmax(0,1fr);grid-auto-rows:1fr;padding:0}
.legacy-names>.legacy-person-card,.legacy-names>.legacy-person-card:nth-of-type(2){width:100%;margin:0}
.legacy-person-card .profile-invitation{margin-top:auto}
.header-actions .header-support{background:linear-gradient(130deg,#dcecf2,#b9d7e2);color:#123c4b;border-color:#e5f5ff;box-shadow:inset 0 1px #fff,0 4px 0 #153e4bc0}
.header-actions .header-support:hover{background:#e4f3f8;color:#0b2b38}
.header-actions .header-support .icon{display:block;flex:0 0 22px;width:22px;height:22px;visibility:visible;opacity:1}
html.aof-motion.scene-motion [data-reveal]{transition-duration:.9s;transition-timing-function:cubic-bezier(.16,1,.3,1)}
html.aof-motion.scene-motion :is(.step-card,.cause-card)[data-reveal].waiting{transform:perspective(1000px) translate3d(0,42px,-24px) rotateX(3deg);filter:blur(2px)}
html.aof-motion.scene-motion .legacy-person-card[data-reveal].waiting{transform:perspective(1000px) translate3d(-42px,24px,-30px) rotateY(5deg)}
html.aof-motion.scene-motion .legacy-person-card:nth-of-type(2)[data-reveal].waiting{transform:perspective(1000px) translate3d(42px,24px,-30px) rotateY(-5deg)}
html.aof-motion.scene-motion .editorial-photo[data-reveal].waiting{transform:perspective(1100px) translate3d(0,40px,-25px) rotateY(-3deg);filter:blur(3px)}
html.aof-motion.scene-motion [data-reveal].is-visible{filter:none;transform:none}
@media(hover:hover) and (pointer:fine){html.aof-motion .legacy-person-card.is-visible:hover{translate:0 -5px}}
@media(max-width:639px){.step-grid.service-card-grid{grid-template-columns:minmax(0,1fr)}html.aof-motion.scene-motion .legacy-person-card[data-reveal].waiting{transform:translateY(28px)}}
.aof-photo-layout .hero-glass .hero-copy,.section-copy,.giving-banner .section-copy{font-size:17px;line-height:1.8}
.giving-banner h2{font-size:clamp(36px,5.5vw,72px);line-height:1.12}
@media(min-width:1200px){#aof-navigation a:not(.button){font-size:14px}#aof-navigation ul{gap:2px}#aof-navigation li a{padding-inline:8px}.nav-inner{gap:14px}.header-actions{min-width:200px}}
.footer-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.aof-footer a{overflow-wrap:anywhere}.aof-footer .text-button{white-space:normal;text-align:left;min-height:44px}
.project-lightbox>button{position:sticky;top:0;z-index:3}.project-lightbox .gallery-controls{position:sticky;bottom:-1px;background:#143a32;padding:12px;border-radius:12px}
.project-gallery a{background:#153e30}.project-gallery img{object-fit:contain;background:#153e30}.project-gallery figure{align-self:start}
.sample-notice{padding:16px 20px;border:1px solid #bca66b;border-radius:14px;background:#f8f1d9;color:#284335;font-size:15px;line-height:1.6}
.aof-motion .legacy-person-card{animation:none}.profile-dialog:focus-visible{outline:3px solid #d5b56b;outline-offset:4px}
@media(max-width:1000px){.combined-controls [data-intro-status]{display:none}}
@media(max-width:760px){.memorial-profile-dialog .profile-panel{grid-template-columns:minmax(0,1fr);gap:24px;padding:64px 22px 28px}.memorial-profile-dialog .profile-visual{width:min(100%,250px);justify-self:center}.memorial-profile-dialog .profile-visual img{max-height:250px}.combined-person{padding:16px 12px}.combined-fullname{font-size:17px}.combined-note{font-size:13px}}
@media(max-width:639px){.cause-grid{grid-template-columns:minmax(0,1fr)}.combined-people{grid-template-columns:1fr!important;gap:18px}.combined-stage{margin:0 auto;padding:14px 16px 24px}.combined-person .combined-portrait{height:150px}.combined-person .name-art{height:52px}.combined-heading{gap:10px}.combined-heading .eyebrow{font-size:10px;letter-spacing:.12em}.combined-scroll{inset:95px 0 148px}.combined-controls{bottom:20px;max-width:none}.memorial-enter{bottom:80px;min-width:240px}.memorial-skip{bottom:20px!important}.form-pair{grid-template-columns:minmax(0,1fr)}.section-heading{gap:20px}.hero-glass h1{overflow-wrap:break-word}}
@media(prefers-reduced-motion:reduce){.profile-dialog{scroll-behavior:auto}html *{scroll-behavior:auto!important}}
@media(max-width:639px){.combined-person .draw-name{height:64px}}
/* Compact, scrollable navigation keeps the page visible in both phone orientations. */
@media(max-width:1199px){
 #aof-navigation{padding:14px 20px 20px;max-height:min(65dvh,calc(100dvh - 132px - var(--wp-admin--admin-bar--height,0px)));overscroll-behavior:contain;scrollbar-gutter:stable;border-radius:0 0 18px 18px}
 #aof-navigation ul{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 12px}
 #aof-navigation li a{font-family:var(--sans);font-size:16px;line-height:1.35;min-height:44px;padding:10px 8px;display:flex;align-items:center}
 #aof-navigation .header-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:none;min-width:0;margin-top:14px;gap:12px}
 #aof-navigation .header-actions .button{min-height:48px;padding:10px 12px;font-size:12px;gap:8px;white-space:normal}
}
@media(max-width:639px){.nav-inner{min-height:96px}.aof-header .brand img{width:84px;height:88px}}
@media(max-width:1199px) and (orientation:landscape) and (max-height:540px){
 .aof-topline{display:none}.nav-inner{min-height:72px}.aof-header .brand img{width:62px;height:66px}
 #aof-navigation{padding:10px 20px 14px;max-height:calc(100dvh - 84px - var(--wp-admin--admin-bar--height,0px))}
 #aof-navigation ul{grid-template-columns:repeat(4,minmax(0,1fr))}
 #aof-navigation li a{font-size:14px}
 #aof-navigation .header-actions{margin-top:8px;max-width:500px}
}
/* 2.8.4 — portraits and long remembrances remain readable in short viewports. */
.combined-person .combined-portrait{height:auto!important}
.combined-dates{grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:290px}
.combined-dates time{white-space:normal}
.combined-scroll{scroll-padding-block:16px;touch-action:pan-y;overflow-x:hidden}
.combined-person{scroll-margin-block:16px}
.memorial-reading-hint{display:none;position:absolute;z-index:3;top:65px;left:16px;right:16px;margin:0;text-align:center;font-size:12px;line-height:1.5;color:#eee1bd}
.is-scroll-reading .memorial-reading-hint{display:block}
.memorial-combined.is-paused .combined-remembrance{animation:none!important;opacity:1!important;transform:none!important}
@media(max-width:639px){
 html .memorial-profile-dialog .profile-visual img{max-height:250px}
 .combined-fullname{min-height:0;margin-bottom:16px;overflow-wrap:anywhere}
 .combined-note{min-height:0}
 .combined-person .combined-portrait{width:176px}
 .combined-scroll{inset:95px 0 145px}
}
@media(orientation:landscape) and (max-height:540px){
 .combined-heading{top:8px}.combined-heading img{width:32px;height:34px}
 .memorial-reading-hint{top:48px;font-size:11px}
 .combined-scroll{inset:72px 0 76px}
 .combined-stage{margin:0 auto;padding-top:12px}
 .combined-controls{bottom:16px;left:16px;max-width:none}
 .memorial-enter{bottom:16px;min-height:42px;min-width:0;font-size:12px;padding:12px 16px;max-width:44%}
 .memorial-skip{bottom:16px!important;right:16px;min-height:42px;padding:10px 14px;font-size:12px}
 .combined-person .combined-portrait{width:144px}
}
