:root {
  color-scheme: light;
  --ink: #24302f;
  --muted: #5c6966;
  --paper: #fffaf2;
  --paper-strong: #fff4df;
  --sun: #f6b94d;
  --coral: #df6b57;
  --leaf: #3f7d68;
  --sky: #d9eff2;
  --blue: #2f5c80;
  --line: rgba(36, 48, 47, 0.14);
  --shadow: 0 10px 30px rgba(62, 51, 31, 0.1);
  --shadow-soft: 0 4px 16px rgba(62, 51, 31, 0.08);
  --shadow-lift: 0 16px 38px rgba(62, 51, 31, 0.16);
  --radius: 14px;
  --header-height: 65px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 242, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.nav-links,
.hero-actions,
.card-actions,
.form-footer,
.split-heading {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.nav-links {
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a,
.text-link,
.site-footer a {
  text-decoration: none;
}

.nav-links a:hover,
.text-link:hover,
.site-footer a:hover {
  color: var(--coral);
}

.hero {
  background: var(--paper);
}

.hero-media {
  position: relative;
  height: clamp(380px, 62vh, 640px);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 36%;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36, 48, 47, 0.1), rgba(36, 48, 47, 0) 24%, rgba(255, 250, 242, 0) 78%, rgba(255, 250, 242, 0.9));
}

.hero-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(26px, 4vw, 46px) 0 10px;
}

.hero-content {
  min-width: 0;
}

.hero-portrait {
  position: relative;
  z-index: 1;
  width: clamp(190px, 21vw, 270px);
  margin: calc(clamp(80px, 12vw, 150px) * -1) 8px 0 0;
  padding: 10px 10px 14px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.3);
  transform: rotate(2.5deg);
  justify-self: end;
}

.hero-portrait img {
  width: 100%;
  border-radius: 6px;
}

.hero-portrait figcaption {
  margin: 10px 2px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.98rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.06;
}

h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.7rem, 8vw, 5.4rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.9rem, 4.6vw, 3.6rem);
}

h3 {
  font-size: 1.3rem;
}

.hero-dates {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  font-weight: 500;
}

.hero-copy {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.16rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--coral);
  color: white;
  box-shadow: 0 10px 24px rgba(122, 51, 38, 0.24);
}

.button-primary:hover {
  background: #c85745;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line);
  color: var(--ink);
}

.button-light {
  background: #fff;
  border-color: var(--line);
  color: var(--blue);
}

.section {
  padding: clamp(58px, 9vw, 108px) 0;
}

.section-inner {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.section-intro {
  background: var(--paper);
  padding-top: 42px;
}

.intro-grid,
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 7vw, 82px);
}

.story-layout {
  display: block;
}

.story-layout .details-panel {
  float: right;
  width: clamp(280px, 32%, 360px);
  margin: 6px 0 26px clamp(28px, 5vw, 56px);
}

.story-layout::after {
  content: "";
  display: block;
  clear: both;
}

.intro-grid p,
.section-heading p,
.form-layout > div > p {
  color: var(--muted);
  font-size: 1.08rem;
}

.story-copy p {
  color: var(--muted);
  font-size: 1.06rem;
}

.details-panel {
  align-self: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.details-panel dl {
  display: grid;
  gap: 16px;
  margin: 22px 0 0;
}

.details-panel dt {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.details-panel dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 750;
  white-space: pre-line;
}

.photo-band {
  background: linear-gradient(180deg, var(--sky), #fef8ec);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.subsection-heading {
  max-width: 760px;
  margin: 0 0 18px;
}

.subsection-heading h3,
.album-browser-heading h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.15;
}

.subsection-heading p,
.album-browser-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.split-heading {
  max-width: none;
  justify-content: space-between;
  gap: 18px;
}

.text-link {
  color: var(--blue);
  font-weight: 850;
}

.text-button {
  min-height: 42px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--coral);
}

.photo-grid,
.album-grid,
.tribute-grid,
.nonprofit-grid {
  display: grid;
  gap: 18px;
}

.photo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.featured-photos {
  margin-bottom: 42px;
}

.featured-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.album-section {
  margin-top: 10px;
}

.album-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.album-card {
  min-width: 0;
}

.album-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 270px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: var(--ink);
  color: white;
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.album-button img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.album-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36, 48, 47, 0.08), rgba(36, 48, 47, 0.78));
}

.album-button:hover img,
.album-button:focus-visible img {
  opacity: 0.95;
  transform: scale(1.03);
}

.album-button:focus-visible {
  outline: 3px solid rgba(223, 107, 87, 0.82);
  outline-offset: 3px;
}

.album-content {
  position: relative;
  z-index: 1;
  align-self: end;
  padding: 20px;
}

.album-content h4 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.15;
}

.album-content p {
  margin: 8px 0 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.94rem;
  line-height: 1.45;
}

.album-count {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: var(--radius);
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.album-browser {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(36, 48, 47, 0.14);
}

.album-browser[hidden] {
  display: none;
}

.album-browser-heading {
  margin-bottom: 20px;
}

.gallery-count {
  min-height: 26px;
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.photo-card {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 180ms ease;
}

.photo-card:hover {
  box-shadow: var(--shadow-lift);
}

.photo-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 180ms ease;
}

.photo-card:hover img,
.photo-button:focus-visible img {
  transform: scale(1.03);
}

.photo-button:focus-visible {
  outline: 3px solid rgba(223, 107, 87, 0.7);
  outline-offset: -3px;
}

.browse-all-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  color: var(--text);
  background: linear-gradient(160deg, rgba(223, 107, 87, 0.12), rgba(223, 107, 87, 0.04));
  transition: background 180ms ease;
}

.browse-all-tile:hover {
  background: linear-gradient(160deg, rgba(223, 107, 87, 0.22), rgba(223, 107, 87, 0.08));
}

.browse-all-label {
  font-weight: 600;
  font-size: 1.05rem;
}

.browse-all-label::after {
  content: " \2192";
}

.browse-all-count {
  font-size: 0.85rem;
  color: var(--muted, #6b6b6b);
}

.tribute-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 540px));
  justify-content: center;
}

.tribute-card,
.nonprofit-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.tribute-card {
  position: relative;
  padding: 30px 28px 26px;
  border-top: 4px solid var(--sun);
}

.tribute-card::before {
  content: "\201C";
  display: block;
  height: 0.45em;
  color: var(--coral);
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 1;
}

.tribute-message {
  margin: 14px 0 20px;
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.14rem;
  line-height: 1.55;
}

.tribute-name {
  margin: 0;
  font-weight: 850;
}

.tribute-relationship {
  margin: 2px 0 0;
  color: var(--muted);
}

.donate-band {
  background: #f9eabf;
}

.nonprofit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nonprofit-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px;
}

.nonprofit-image {
  display: grid;
  min-height: 150px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.nonprofit-image img {
  width: 112px;
  height: 112px;
}

.nonprofit-card p {
  flex: 1;
  color: var(--muted);
}

.card-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.form-section {
  background: var(--paper);
}

.tribute-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.field-group {
  display: grid;
  gap: 7px;
}

label {
  color: var(--ink);
  font-weight: 850;
}

label span {
  color: var(--muted);
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(36, 48, 47, 0.2);
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--ink);
  font: inherit;
  background: #fffdfa;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(246, 185, 77, 0.45);
  border-color: var(--coral);
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-weight: 650;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.form-footer {
  flex-wrap: wrap;
  gap: 14px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.form-status.is-warning {
  color: #9a4f13;
}

.form-status.is-success {
  color: var(--leaf);
}

/* Honeypot: visually hidden bot trap, kept out of the layout and a11y tree. */
.field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.closing-band {
  padding: clamp(54px, 8vw, 92px) 18px;
  background: linear-gradient(180deg, var(--paper), var(--sky));
  text-align: center;
}

.closing-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
}

.closing-quote {
  width: min(720px, 100%);
  margin: 0 auto;
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  line-height: 1.35;
}

.closing-dates {
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  background: var(--ink);
  color: white;
}

.site-footer p {
  margin: 0;
}

.has-lightbox {
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}

.reveal.is-revealed {
  opacity: 1;
  transform: none;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 30px);
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 25, 24, 0.86);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(1180px, 100%);
}

.lightbox-figure {
  display: grid;
  gap: 12px;
  margin: 0;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: min(78vh, 820px);
  margin: 0 auto;
  border-radius: var(--radius);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.36);
}

.lightbox-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: white;
  font-weight: 800;
}

.lightbox-figure figcaption span:last-child {
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.lightbox-nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.lightbox-close {
  position: absolute;
  top: -54px;
  right: 0;
  min-height: 42px;
  padding: 9px 14px;
}

.lightbox-nav {
  min-width: 92px;
  min-height: 48px;
  padding: 10px 14px;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  background: var(--coral);
  color: white;
  outline: none;
}

@media (max-width: 860px) {
  .lightbox {
    place-items: stretch;
    padding: 10px;
  }

  .lightbox-dialog {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .lightbox-close {
    position: static;
    align-self: flex-end;
    order: 0;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px;
  }

  .lightbox-figure {
    order: 1;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    touch-action: pan-y;
  }

  .lightbox-figure img {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
  }

  .lightbox-figure figcaption {
    flex: 0 0 auto;
    justify-content: center;
  }

  .lightbox-nav-row {
    order: 2;
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
  }

  .lightbox-nav {
    flex: 1 1 0;
    min-width: 0;
    min-height: 52px;
    padding: 12px 14px;
  }

  .lightbox-close,
  .lightbox-nav {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .site-header {
    gap: 14px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .brand-mark {
    width: 26px;
    height: 26px;
  }

  .nav-links {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-media {
    height: clamp(300px, 48vh, 460px);
  }

  .hero-banner {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .hero-content .hero-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-portrait {
    order: -1;
    width: 174px;
    margin: -64px auto 12px;
    transform: rotate(-2deg);
    justify-self: center;
  }

  .intro-grid,
  .story-layout,
  .form-layout,
  .tribute-grid,
  .nonprofit-grid {
    grid-template-columns: 1fr;
  }

  .story-layout .details-panel {
    float: none;
    width: auto;
    margin: 0 0 26px;
  }

  .photo-grid,
  .featured-grid,
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .lightbox {
    padding: 8px;
  }

  .lightbox-figure figcaption {
    flex-direction: column;
    gap: 4px;
  }

  .lightbox-figure figcaption span:last-child {
    white-space: normal;
  }

  .brand span:last-child {
    display: none;
  }

  .nav-links {
    font-size: 0.88rem;
    gap: 14px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .photo-grid,
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .album-grid {
    grid-template-columns: 1fr;
  }

  .split-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Puget Sound Travels map */
.travels-map {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: clamp(1.25rem, 3vw, 2.25rem) auto 0;
  aspect-ratio: 1367 / 768;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.travels-map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.travels-frame {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.travels-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.travels-frame:hover,
.travels-frame:focus-visible {
  transform: scale(1.04);
  filter: brightness(1.06);
  outline: none;
  z-index: 2;
}

.travels-frame:focus-visible {
  box-shadow: 0 0 0 3px var(--sun, #e8b04b);
}

.travels-frame-empty {
  cursor: default;
}

/* Tide remembrance message */
.tide-section {
  text-align: center;
}

.tide-message {
  max-width: 720px;
  margin-inline: auto;
}

.tide-icon {
  width: clamp(48px, 8vw, 68px);
  height: auto;
  color: var(--blue, #3a6ea5);
  margin-bottom: 0.75rem;
}

.tide-heading {
  font-family: "Fraunces", serif;
  font-style: italic;
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.tide-message p {
  margin: 0 auto 1rem;
  max-width: 60ch;
  color: var(--muted, #4a4a4a);
  line-height: 1.7;
}

.tide-message p:last-child {
  margin-bottom: 0;
}
