:root {
  --ink: #253348;
  --navy: #192b43;
  --link: #234f7a;
  --line: #dce2e8;
  --shell: 72rem;
  --gutter: clamp(1rem, 3.5vw, 3rem);
  --feedback-ease: cubic-bezier(.22, .61, .36, 1);
  color: var(--ink);
  background: #fff;
  font: 100%/1.65 system-ui, sans-serif;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .16em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid #326ca8; outline-offset: 4px; }
button { font: inherit; }
.shell { width: min(var(--shell), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip-link {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 10;
  padding: .65rem 1rem;
  background: #fff;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.masthead { border-top: .24rem solid var(--navy); }
.masthead h1 { margin: 0; padding-block: .35rem; }
.masthead h1 a { display: inline-block; max-width: 100%; vertical-align: middle; }
.masthead img { width: min(31.25rem, 100%); }

.site-nav { background: #fff; border-block: 1px solid var(--line); }
.site-nav ul { display: flex; flex-wrap: wrap; margin-block: 0; padding: .25rem 0; gap: .125rem .5rem; list-style: none; }
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .4rem .65rem;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color 200ms var(--feedback-ease), border-color 200ms var(--feedback-ease);
}
.site-nav a:hover, .site-nav a[aria-current] { background: #edf2f7; border-bottom-color: #4d7096; }
.site-nav a:focus-visible { outline-offset: -3px; }
.section, main { scroll-margin-top: var(--anchor-offset, 1rem); }
@media (min-width: 63rem) {
  :root { --anchor-offset: 4.5rem; }
  .site-nav { position: sticky; top: 0; z-index: 2; }
}

.hero { padding-block: clamp(.875rem, 2.5vw, 2rem); }
.slideshow { overflow: hidden; border: 1px solid var(--line); border-radius: .45rem; background: #f4f6f8; }
.slides { position: relative; isolation: isolate; aspect-ratio: 1920 / 700; }
.slides img { width: 100%; }
.slide-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .3rem clamp(.5rem, 2vw, 1rem);
  gap: .5rem;
  font-size: .875rem;
}
.control-group, .lightbox-controls { display: flex; gap: .375rem; }
.slide-controls button, .lightbox button {
  min-width: 44px;
  min-height: 44px;
  padding: .25rem .75rem;
  border: 1px solid #a6b4c4;
  border-radius: .3rem;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 160ms var(--feedback-ease);
}
.slide-controls button:hover, .lightbox button:hover { background: #e7eef6; }

.section { padding-block: clamp(2.75rem, 6vw, 5rem); border-top: 1px solid #15274218; }
.section h2 {
  margin: 0 0 .9em;
  color: var(--navy);
  font: 400 clamp(1.65rem, 1.25rem + 1.5vw, 2.55rem)/1.13 Georgia, Cambria, serif;
  text-wrap: balance;
}
.reading { width: min(100%, 69ch); margin-inline: auto; }
.reading p { margin-block: 0 1em; font-size: clamp(1rem, .96rem + .23vw, 1.125rem); }
.reading p:last-child { margin-bottom: 0; }
.about {
  color: #f2f5f9;
  background-color: var(--navy);
  background-image: linear-gradient(#192b43eb, #192b43f5), url("images/sk_reasonbg02.jpg");
  background-position: center;
  background-size: cover;
}
.about h2 { color: #fff; }
.photos { background: #f6f3e4; }
.mass { background: #f4eff7; }
.parting { background: #eaf3ef; }
.news { background: #eef5fa; }
.news img { border: 1px solid #b8c8d6; }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.75rem, 1.75vw, 1.35rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.photo {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--ink);
  border: 1px solid #b2bec8;
  border-radius: .4rem;
  background: #fff;
  text-decoration: none;
  transition: border-color 200ms var(--feedback-ease);
}
.photo:hover { border-color: #326ca8; }
.photo:hover .photo-caption { text-decoration: underline; }
.photo-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: .35rem .35rem 0 0;
  background: #e9edf0;
}
.photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 220ms var(--feedback-ease);
}
/* The original blue overlay and magnifier, with the photograph still visible. */
.photo-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle, transparent 0 5px, #fff 5.5px 7px, transparent 7.5px) center / 24px 24px no-repeat,
    linear-gradient(45deg, transparent 40%, #fff 43% 57%, transparent 60%)
      calc(50% + 7px) calc(50% + 7px) / 8px 8px no-repeat,
    radial-gradient(circle, #192b43e8 0 16px, transparent 17px) center / 36px 36px no-repeat,
    #47567a59;
  transition: opacity 200ms ease-in-out;
}
.photo:focus-visible .photo-frame::after { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .photo:hover .photo-frame::after { opacity: 1; }
  .photo:hover .photo-frame img { transform: scale(1.035); }
}
.photo-caption {
  padding: .55rem .625rem .65rem;
  font-size: .9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.site-footer { padding-block: 1.35rem; background: var(--navy); color: #f1f5fa; font-size: .875rem; }
.site-footer .shell { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.5rem; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; }

.has-review { padding-bottom: 3.75rem; }
.review-note {
  position: fixed;
  inset: auto 0 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .1rem .85rem;
  padding: .45rem .65rem;
  border-top: 1px solid #9c7d41;
  background: #fff4d7;
  color: #382b14;
  font-size: .8125rem;
  line-height: 1.35;
  text-align: center;
}
.review-note span { white-space: nowrap; }

.lightbox {
  width: min(58rem, 100% - 1.25rem);
  max-height: calc(100dvh - 1.25rem);
  padding: .75rem;
  border: 1px solid #65778f;
  border-radius: .5rem;
  color: #f5f8fc;
  background: var(--navy);
  overflow: auto;
}
.lightbox::backdrop { background: #080e18e8; }
body:has(.lightbox[open]) { overflow: hidden; }
.lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
.lightbox figure { margin: 0; }
.lightbox-image { width: 100%; height: min(65dvh, 38rem); object-fit: contain; background: #101d2d; }
.lightbox-caption { padding: .6rem 0; line-height: 1.45; }
.lightbox-controls { justify-content: space-between; }
.lightbox button[aria-disabled="true"] { color: #5b6570; background: #d8dee5; cursor: default; }
.lightbox :focus-visible, .site-footer :focus-visible { outline-color: #a3d2ff; }

@media (prefers-reduced-motion: no-preference) {
  .slides.is-dissolving::before {
    position: absolute;
    inset: 0;
    content: "";
    background: var(--previous-slide) center / contain no-repeat;
    pointer-events: none;
  }
  .slides.is-dissolving img:not([hidden]) {
    position: relative;
    animation: memorial-dissolve 480ms ease-in-out both;
  }
  .lightbox[open] { animation: memorial-viewer-in 220ms var(--feedback-ease) both; }
  .lightbox[open]::backdrop { animation: memorial-dissolve 240ms ease-out both; }
}

@keyframes memorial-dissolve {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes memorial-viewer-in {
  from { opacity: 0; transform: translateY(.25rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 48rem) {
  .site-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav li { min-width: 0; }
  .site-nav a { height: 100%; padding-inline: .45rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lightbox-image { height: min(53dvh, 29rem); }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .site-nav a, .slide-controls button, .lightbox button,
  .photo, .photo-frame img, .photo-frame::after { transition: none; }
  .photo:hover .photo-frame img { transform: none; }
}
