/* Memorial Tribute Site — Mrs. Jolaosho
   Direction: Adire. Indigo resist-dyed cloth from Abeokuta. The patterned
   indigo band is the one bold element; everything around it stays quiet
   cotton and ink. Deliberately single-theme (a printed-cloth look). */

:root {
  --cotton: #F4F5F1;
  --cloth: #FAFBF8;
  --indigo: #1E3456;
  --deep: #152641;
  --dye: #8EA3C4;
  --stitch: #C6D0DE;
  --ink: #19202C;
  --muted: #4B5E80;
  --line: #DDE3EA;

  --display: "Bodoni Moda", Didot, "Bodoni 72", "Times New Roman", serif;
  --text: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --shell: 1080px;
  --column: 640px;

  /* Adire eleko-style motif, drawn in CSS so it stays sharp at any size. */
  --adire:
    radial-gradient(circle at 50% 50%, rgba(142, 163, 196, .55) 0 3px, transparent 3.5px),
    radial-gradient(circle at 50% 50%, transparent 0 9px, rgba(142, 163, 196, .28) 9.5px 10.5px, transparent 11px),
    repeating-linear-gradient(90deg, transparent 0 27px, rgba(142, 163, 196, .18) 27px 28px),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(142, 163, 196, .18) 27px 28px);
  --adire-size: 28px 28px, 28px 28px, 56px 56px, 56px 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cotton);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
textarea,
button {
  font: inherit;
  color: inherit;
}

::placeholder {
  color: #8290A6;
}

img {
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, textarea, label.dropzone):focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ── Top bar ────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: rgba(244, 245, 241, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-mark {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
}

.mark-short {
  display: none;
}

.topbar-nav {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.navlink {
  padding-bottom: 3px;
  border-bottom: 1.5px solid transparent;
  color: var(--muted);
}

.navlink:hover {
  color: var(--indigo);
}

.navlink.is-current {
  color: var(--indigo);
  border-color: var(--indigo);
}

/* ── Hero: the indigo band ─────────────────────────────────────────── */

.band {
  background-color: var(--indigo);
  background-image: var(--adire);
  background-size: var(--adire-size);
}

.hero-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.portrait-frame {
  width: clamp(200px, 26vw, 280px);
  max-width: 100%;
  aspect-ratio: 1;
  background: var(--cotton);
  border-radius: 4px;
  outline: 8px solid var(--cotton);
  outline-offset: -1px;
  box-shadow: 0 0 0 9px var(--deep), 0 0 0 11px var(--dye);
  overflow: hidden;
}

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

.id-card {
  background: var(--cotton);
  border-radius: 4px;
  padding: 28px 32px 30px;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

.name {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--indigo);
  text-wrap: balance;
}

.name .honorific {
  font-style: italic;
  font-weight: 400;
  font-size: 0.55em;
  letter-spacing: 0;
  margin-right: 0.12em;
  vertical-align: 0.28em;
}

.dates {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.tagline {
  margin: 4px 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink);
}

.tagline span { white-space: nowrap; }

/* ── About: the family's words ─────────────────────────────────────── */

.about {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 64px 28px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 72px);
}

.said {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(24px, 3vw, 31px);
  line-height: 1.38;
  color: var(--indigo);
  text-wrap: pretty;
  max-width: 24ch;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-text p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.75;
  max-width: 58ch;
}

.she-was {
  margin-top: 8px;
}

.she-was h2 {
  margin: 0 0 12px;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

.qualities {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qualities li {
  font-size: 14px;
  padding: 6px 13px;
  border: 1.5px dashed var(--stitch);
  border-radius: 999px;
  background: var(--cloth);
  color: var(--indigo);
}

/* ── Shared section furniture ──────────────────────────────────────── */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.1;
  color: var(--indigo);
}

.section-title--sm {
  font-size: 26px;
}

.section-meta {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.section-action {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--indigo);
  white-space: nowrap;
}

.section-action:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Compose ───────────────────────────────────────────────────────── */

.compose {
  max-width: var(--column);
  margin: 88px auto 0;
  padding: 0 28px;
}

.compose-lede {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 56ch;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.field {
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #CDD5E0;
  border-radius: 3px;
  font-size: 16px;
  outline: none;
}

.field:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(30, 52, 86, 0.12);
}

.field--area {
  line-height: 1.65;
  resize: vertical;
}

.dropzones {
  display: grid;
  grid-template-columns: 1fr;
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px;
  text-align: center;
  background: var(--cloth);
  border: 1.5px dashed var(--stitch);
  border-radius: 3px;
  font-size: 14.5px;
  color: var(--muted);
  cursor: pointer;
}

.dropzone:hover {
  border-color: var(--dye);
  color: var(--indigo);
}

.dropzone.is-disabled {
  cursor: default;
  opacity: 0.6;
}

.dropzone.is-disabled:hover {
  border-color: var(--stitch);
  color: var(--muted);
}

.link-btn {
  align-self: flex-start;
  margin-top: -6px;
  padding: 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--stitch);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.link-btn:hover {
  color: var(--indigo);
  border-color: var(--indigo);
}

.notice {
  margin: 0;
  padding: 12px 14px;
  background: #E7ECF3;
  border-radius: 3px;
  font-size: 14px;
  color: var(--indigo);
}

.btn-post {
  margin-top: 4px;
  min-height: 54px;
  padding: 15px;
  background: var(--indigo);
  color: var(--cotton);
  border: none;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-post:hover {
  background: var(--deep);
}

.btn-post[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* ── Gallery strip + tiles ─────────────────────────────────────────── */

.strip {
  max-width: var(--shell);
  margin: 96px auto 0;
  padding: 0 28px;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.tile {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  background: var(--cloth);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.tile--link {
  display: block;
  cursor: pointer;
}

.tile-media {
  position: absolute;
  inset: 0;
}

.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.tile--link:hover .tile-media img {
  transform: scale(1.03);
}

.tile-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.tile-label--over {
  color: var(--cotton);
  background: linear-gradient(transparent, rgba(21, 38, 65, 0.82));
}

/* ── Tribute wall ──────────────────────────────────────────────────── */

.wall {
  max-width: var(--column);
  margin: 96px auto 0;
  padding: 0 28px;
}

.wall-eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.wall-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.entry {
  background: var(--cloth);
  border: 1.5px dashed var(--stitch);
  border-radius: 6px;
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: rise .5s ease both;
}

@keyframes rise {
  from {
    opacity: 0.4;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.entry-name {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
}

.entry-rel {
  font-size: 13.5px;
  color: var(--muted);
}

.entry-when {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.entry-msg {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.entry-media img {
  width: 100%;
  display: block;
  border-radius: 3px;
}

.entry-rule {
  display: none;
}

.wall-empty {
  margin: 28px 0 0;
  padding: 36px 24px;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: 21px;
  color: var(--indigo);
  border: 1.5px dashed var(--stitch);
  border-radius: 6px;
  background: var(--cloth);
}

/* ── Pagination ────────────────────────────────────────────────────── */

.pager {
  margin-top: 36px;
}

.pager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pager-step {
  min-height: 44px;
  padding: 10px 18px;
  background: transparent;
  border: 1.5px solid var(--indigo);
  border-radius: 3px;
  color: var(--indigo);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.pager-step:hover:not([disabled]) {
  background: var(--indigo);
  color: var(--cotton);
}

.pager-step[disabled] {
  opacity: 0.3;
  cursor: default;
}

.pager-pages {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
}

.pager-page {
  min-width: 36px;
  min-height: 36px;
  padding: 6px 8px;
  background: none;
  border: none;
  border-radius: 3px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  cursor: pointer;
}

.pager-page:hover {
  color: var(--indigo);
  background: #E7ECF3;
}

.pager-page[aria-current="page"] {
  background: var(--indigo);
  color: var(--cotton);
}

.pager-gap {
  min-width: 18px;
  text-align: center;
  color: #8290A6;
  user-select: none;
}

.pager-range {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ── Gallery page ──────────────────────────────────────────────────── */

.gallery-hero .hero-inner {
  padding-block: 44px;
  grid-template-columns: minmax(0, 1fr);
}

.gallery-hero .id-card {
  max-width: 640px;
}

.gallery-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 58px);
  line-height: 1.05;
  color: var(--indigo);
}

.gallery-lede {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
  max-width: 52ch;
}

.gallery-counts {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.gallery {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 44px 28px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  padding-bottom: 40px;
}

.gallery-foot {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.gallery-foot-note {
  font-size: 14.5px;
  color: var(--muted);
}

/* ── Footer ────────────────────────────────────────────────────────── */

.footer {
  margin-top: 110px;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 44px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.footer-card {
  background: var(--cotton);
  border-radius: 4px;
  padding: 22px 34px;
}

.sunre {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 28px;
  color: var(--indigo);
}

.rest {
  margin: 4px 0 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Photo viewer ──────────────────────────────────────────────────── */

.tile--zoom { cursor: zoom-in; }
.tile--zoom:hover .tile-media img { transform: scale(1.03); }

body.lb-open { overflow: hidden; }

.lightbox {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cotton);
}

.lightbox::backdrop {
  background: rgba(13, 22, 38, 0.94);
}

.lb-stage {
  height: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px));
}

.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 0;
  max-height: 100%;
}

#lb-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transition: opacity .25s ease;
}

#lb-img.is-loading { opacity: 0.35; }

.lb-meta {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 14px;
  color: var(--stitch);
  text-align: center;
}

.lb-count {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dye);
  font-variant-numeric: tabular-nums;
}

.lb-nav,
.lb-close {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(198, 208, 222, 0.5);
  background: rgba(30, 52, 86, 0.6);
  color: var(--cotton);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 4px;
}

.lb-nav:hover,
.lb-close:hover { background: var(--cotton); color: var(--indigo); border-color: var(--cotton); }

.lb-nav:focus-visible,
.lb-close:focus-visible { outline: 2px solid var(--cotton); outline-offset: 3px; }

.lb-close {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  z-index: 1;
}

/* ── Small screens ─────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .about {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .said {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    padding: 14px 20px;
  }

  .topbar-nav {
    gap: 18px;
  }

  .topbar-mark {
    font-size: 11px;
    letter-spacing: 0.14em;
    white-space: nowrap;
  }

  .mark-full {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .mark-short {
    display: inline;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 40px 20px;
    gap: 30px;
  }

  .portrait-frame {
    width: 210px;
  }

  .id-card {
    padding: 22px 22px 24px;
    text-align: center;
    align-items: center;
  }

  .about,
  .compose,
  .strip,
  .wall,
  .gallery {
    padding-left: 20px;
    padding-right: 20px;
  }

  .compose,
  .strip,
  .wall {
    margin-top: 72px;
  }

  .section-title {
    font-size: 27px;
  }

  .section-title--sm {
    font-size: 23px;
  }

  .entry {
    padding: 18px 18px 16px;
  }

  .strip-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .pager-row {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pager-pages {
    order: -1;
    width: 100%;
    margin-bottom: 4px;
  }

  .pager-step {
    flex: 1 1 auto;
  }

  .footer {
    margin-top: 80px;
  }
}

@media (max-width: 640px) {
  .lb-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "photo photo" "prev next";
    padding-inline: 12px;
    row-gap: 18px;
  }
  .lb-figure { grid-area: photo; align-self: center; }
  .lb-prev { grid-area: prev; justify-self: end; margin-right: 12px; }
  .lb-next { grid-area: next; justify-self: start; margin-left: 12px; }
  #lb-img { max-height: calc(100vh - 230px); }
}
