/* Memorial Tribute Site — Olugbenga Odunaike
   Ported from "Memorial Tribute Site.dc.html" (Claude Design canvas).
   Inline artboard styles are lifted into classes here; the palette, type
   scale and measures are unchanged from the design. */

:root {
  --bg: #faf8f4;
  --ink: #33302b;

  --ink-92: rgba(51, 48, 43, 0.92);
  --ink-90: rgba(51, 48, 43, 0.90);
  --ink-88: rgba(51, 48, 43, 0.88);
  --ink-78: rgba(51, 48, 43, 0.78);
  --ink-75: rgba(51, 48, 43, 0.75);
  --ink-74: rgba(51, 48, 43, 0.74);
  --ink-72: rgba(51, 48, 43, 0.72);
  --ink-45: rgba(51, 48, 43, 0.45);

  --rule: rgba(51, 48, 43, 0.14);
  --rule-soft: rgba(51, 48, 43, 0.12);
  --rule-hair: rgba(51, 48, 43, 0.10);
  --rule-wash: rgba(51, 48, 43, 0.05);
  --field-border: rgba(51, 48, 43, 0.20);
  --dash: rgba(51, 48, 43, 0.30);
  --pill: rgba(51, 48, 43, 0.28);

  /* hex fallbacks first for engines without oklch() */
  --accent: #7b7264;
  --accent: oklch(0.5 0.04 90);
  --accent-dark: #645d50;
  --accent-dark: oklch(0.42 0.04 90);
  --accent-mid: #8a8172;
  --accent-mid: oklch(0.55 0.035 90);
  --notice-bg: #f0ece1;
  --notice-bg: oklch(0.94 0.02 90);

  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: Karla, system-ui, -apple-system, "Segoe UI", sans-serif;

  --shell: 1080px;
  --column: 620px;

  --hatch: repeating-linear-gradient(135deg, rgba(51, 48, 43, 0.06) 0 8px, transparent 8px 16px);
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

input, textarea, button { font: inherit; color: inherit; }
::placeholder { color: var(--ink-45); }

img { max-width: 100%; }

@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.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(--accent);
  outline-offset: 2px;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}

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

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

.mark-short { display: none; }

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

.navlink {
  padding: 0 0 3px;
  border-bottom: 1px solid transparent;
  color: var(--ink-75);
}

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

/* ── Hero ───────────────────────────────────────────────────────────── */

.portrait-band {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 64px 28px 0;
  display: flex;
  justify-content: center;
}

/* <picture> is the flex item, so it carries the sizing — leaving it on the
   <img> would let the image sit left-aligned inside a wider picture box, and
   would resolve max-width against that box instead of the band. */
.portrait-band picture {
  display: block;
  width: 420px;
  max-width: 78%;
}

.portrait {
  width: 100%;
  height: auto;
  display: block;
}

.hero {
  max-width: var(--column);
  margin: 0 auto;
  padding: 52px 28px 0;
  text-align: center;
}

.hero-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 54px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-role {
  margin: 16px 0 0;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-dates {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--ink-78);
}

.hero-message {
  margin: 34px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.65;
  color: var(--ink-90);
  text-wrap: pretty;
}

.hero-closing {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.closing-eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.closing-line {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  color: var(--ink-88);
}

.closing-line--italic { font-style: italic; }

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

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

.section-head--bare {
  padding-top: 26px;
  padding-bottom: 0;
  border-bottom: none;
}

.section-head--ruled { padding-bottom: 20px; }

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
}

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

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

.section-meta {
  font-size: 12px;
  color: var(--ink-74);
}

.section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-72);
}

.hairline {
  height: 1px;
  background: var(--rule);
}

/* ── Gallery strip (home) ───────────────────────────────────────────── */

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

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

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

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

.compose-lede {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-78);
  text-wrap: pretty;
}

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

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

.field:focus { border-color: var(--accent-mid); }

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

.dropzones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--dash);
  border-radius: 2px;
  font-size: 14px;
  color: var(--ink-78);
  cursor: pointer;
}

.dropzone:hover {
  border-color: var(--accent-mid);
  color: var(--ink);
}

.dropzone.is-disabled {
  cursor: default;
  opacity: 0.55;
  background: transparent;
}

.dropzone.is-disabled:hover {
  border-color: var(--dash);
  color: var(--ink-78);
}

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

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

.notice {
  margin: 0;
  padding: 12px 14px;
  background: var(--notice-bg);
  border-radius: 2px;
  font-size: 13px;
  color: var(--accent-dark);
}

.btn-post {
  margin-top: 4px;
  min-height: 52px;
  padding: 15px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-post:hover { background: var(--accent-dark); }
.btn-post[disabled] { opacity: 0.6; cursor: default; }

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

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

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

.entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadein 0.5s ease both;
}

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

.entry-name {
  font-size: 16px;
  font-weight: 500;
}

.entry-rel {
  font-size: 13px;
  color: var(--ink-74);
}

.entry-when {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-72);
}

.entry-msg {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.7;
  color: var(--ink-92);
  text-wrap: pretty;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.entry-media { margin-top: 4px; }

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

.entry-rule {
  height: 1px;
  background: var(--rule-hair);
  margin-top: 14px;
}

.wall-empty {
  margin: 40px 0 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-74);
}

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

.pager {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--rule-hair);
}

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

.pager-step {
  min-height: 44px;
  padding: 11px 20px;
  background: transparent;
  border: 1px solid var(--pill);
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.pager-step:hover:not([disabled]) { background: var(--rule-wash); }

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

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

.pager-page {
  min-width: 34px;
  min-height: 34px;
  padding: 6px 8px;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-74);
  cursor: pointer;
}

.pager-page:hover { color: var(--ink); }

.pager-page[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
}

.pager-gap {
  min-width: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-45);
  user-select: none;
}

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

@media (max-width: 640px) {
  .pager-row { flex-wrap: wrap; justify-content: center; }
  .pager-pages { order: -1; width: 100%; margin-bottom: 4px; }
  .pager-step { flex: 1 1 auto; }
}

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

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

.gallery-head { max-width: var(--column); }

.gallery-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 46px;
  line-height: 1.1;
}

.gallery-lede {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
  color: var(--ink-90);
  text-wrap: pretty;
}

.gallery-counts {
  margin-top: 20px;
  display: flex;
  gap: 22px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-74);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 44px;
  padding-bottom: 40px;
}

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

.gallery-foot-note {
  font-size: 14px;
  color: var(--ink-78);
}

/* ── Tiles (shared by strip + gallery) ──────────────────────────────── */

.tile {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  background-image: var(--hatch);
  border: 1px solid var(--rule-soft);
}

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

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

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

.tile-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-72);
}

.tile-label--over {
  color: var(--bg);
  background: linear-gradient(transparent, rgba(30, 28, 25, 0.72));
}

/* Strip and gallery tiles render identically now that both carry photos. */

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

.footer {
  max-width: var(--shell);
  margin: 96px auto 0;
  padding: 28px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-72);
}

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

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

  /* The full mark wraps to two lines below ~420px, which leaves the sticky
     bar ragged against the single-line nav. Show a short label instead and
     keep the full one for screen readers. */
  .topbar-mark { font-size: 11px; letter-spacing: 0.12em; 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; }

  .portrait-band { padding: 44px 20px 0; }
  .hero { padding: 40px 20px 0; }
  .hero-name { font-size: 38px; }
  .hero-message { font-size: 20px; }

  .strip { margin-top: 64px; padding: 0 20px; }
  .compose { margin-top: 72px; padding: 0 20px; }
  .wall { margin-top: 64px; padding: 0 20px; }
  .gallery { padding: 44px 20px 0; }
  .gallery-title { font-size: 36px; }

  .section-title { font-size: 26px; }
  .section-title--sm { font-size: 22px; }
  .entry-msg { font-size: 19px; }
  .footer { margin-top: 72px; }

  /* The artboards are desktop-width; at phone width the design's minmax()
     collapses to one 4:5 tile per screen, which is unreadably tall. */
  .strip-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-grid { gap: 10px; }
  .gallery-grid { gap: 10px; }
}
