/* ==========================================================================
   AmoakoBuachie.com — site stylesheet
   Museum-plain: warm paper ground, quiet rules, artwork given the room.
   ========================================================================== */

:root {
  color-scheme: light;

  --paper:      #FBF9F5;
  --paper-2:    #F4F0E9;
  --surface:    #FFFFFF;
  --ink:        #14130F;
  --ink-2:      #3B372F;
  --muted:      #6E6A60;
  --line:       #E3DDD2;
  --line-soft:  #EFEAE1;
  --accent:     #8A3B21;
  --accent-2:   #A8542F;
  --dark:       #17150F;

  --wrap:       1220px;
  --wrap-text:  62ch;
  --header-h:   73px;

  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.34rem + 0.8vw, 2.1rem);
  --step-3:  clamp(2rem, 1.68rem + 1.6vw, 3.1rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 5.2rem);

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

::selection { background: #E8D9C9; color: var(--ink); }

/* ---------- Layout primitives ---------------------------------------- */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}
@media (min-width: 700px) { .wrap { width: min(100% - 5rem, var(--wrap)); } }

.wrap--narrow { max-width: 78ch; }
.prose { max-width: var(--wrap-text); }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; font-size: var(--step-1); }
.prose > :first-child { margin-top: 0; }
.eyebrow + h2, .eyebrow + h3 { margin-top: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.section { padding-block: clamp(3.5rem, 7vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 4vw, 4rem); }
.section--paper2 { background: var(--paper-2); }
.section--dark { background: var(--dark); color: #E9E4DA; }
.section--dark h2, .section--dark h3 { color: #FBF9F5; }
.section--dark p { color: #C8C2B6; }
.section--dark a { color: #E5C7B2; }
.section--dark a:hover { color: #fff; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}
.section--dark .eyebrow { color: #A69E90; }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
}

.rule { border-top: 1px solid var(--line); }

/* ---------- Buttons --------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95em 1.6em;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.section--dark .btn { border-color: rgba(255,255,255,0.4); color: #F3EFE7; }
.section--dark .btn:hover { background: #F3EFE7; color: var(--dark); border-color: #F3EFE7; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* ---------- Header ---------------------------------------------------- */

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 0.8rem 1.2rem; font-size: 0.85rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: calc(var(--header-h) - 1px);
}
.wordmark {
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
}
.wordmark span {
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 0.25em;
}

.nav__list {
  display: flex; align-items: center; gap: clamp(0.9rem, 1.6vw, 1.9rem);
  list-style: none; margin: 0; padding: 0;
}
.nav__list a {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  padding-block: 0.4em;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.nav__list a:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav__list a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  padding: 0.55rem 0.8rem; cursor: pointer;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink); font-family: var(--sans);
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0.22s;
  }
  .nav[data-open="true"] {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s;
  }
  .nav__list {
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem clamp(1.25rem, 5vw, 2.5rem) 1.75rem;
  }
  .nav__list a {
    display: block; padding: 1rem 0; font-size: 0.9rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__list a[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* ---------- Hero ------------------------------------------------------ */

.hero { border-bottom: 1px solid var(--line); }
.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 6rem);
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 0.95fr 1.05fr; }
}
.hero h1 {
  font-size: var(--step-4);
  letter-spacing: -0.015em;
  margin-bottom: 0.35em;
}
.hero__role {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.6rem;
}
.hero__figure { margin: 0; }
.hero__figure img {
  width: 100%;
  box-shadow: 0 1px 2px rgba(20,19,15,0.06), 0 18px 45px -22px rgba(20,19,15,0.4);
}
.hero__caption {
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: 0.9rem;
  font-style: italic;
}

/* ---------- Institution strip ---------------------------------------- */

.institutions {
  padding-block: 2.4rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.institutions__list {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.6rem clamp(1rem, 3vw, 2.6rem);
  list-style: none; margin: 0; padding: 0;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); text-align: center;
}
.institutions__list li { position: relative; }

/* ---------- Generic page head ----------------------------------------- */

.page-head {
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3.25rem);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 0.4em; }
.breadcrumb {
  font-size: var(--step--1);
  color: var(--muted);
  margin: 0 0 1.4rem;
}
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5em; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5em; color: var(--line); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Split feature -------------------------------------------- */

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}
.split figure { margin: 0; }
.split img { width: 100%; }

/* ---------- Featured works grid --------------------------------------- */

.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem);
  list-style: none; margin: 0; padding: 0;
}
.work { margin: 0; }
.work__frame {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  padding: 0;
  cursor: zoom-in;
  width: 100%;
  overflow: hidden;
  position: relative;
  line-height: 0;
  transition: border-color 0.25s var(--ease), box-shadow 0.3s var(--ease);
}
.work__frame:hover {
  border-color: var(--line);
  box-shadow: 0 12px 32px -18px rgba(20,19,15,0.45);
}
.work__frame img {
  width: 100%;
  transition: transform 0.6s var(--ease);
}
/* In the gallery grid, cap very tall works so rows stay even. */
.works .work__frame {
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
}
.works .work__frame img {
  width: auto; max-width: 100%;
  max-height: clamp(260px, 30vw, 420px);
}
.work__frame:hover img { transform: scale(1.025); }
.work__meta { margin-top: 0.9rem; }
.work__title {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.work__title .year { font-style: normal; color: var(--muted); font-weight: 400; }
.work__detail {
  font-size: var(--step--1);
  color: var(--muted);
  margin: 0.3rem 0 0;
  line-height: 1.5;
}
.work__note {
  font-size: var(--step--1);
  color: var(--accent);
  margin: 0.4rem 0 0;
  font-weight: 500;
}

/* ---------- Gallery filters ------------------------------------------- */

.filter-bar {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(251, 249, 245, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding-block: 1.15rem;
}
.filter {
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  padding: 0.6em 1.05em;
  border: 1px solid var(--line);
  background: transparent; color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter__count { opacity: 0.55; margin-left: 0.45em; font-weight: 400; }

.gallery-status { font-size: var(--step--1); color: var(--muted); margin: 1.75rem 0 0; }
.work[hidden] { display: none; }

/* ---------- Timeline (exhibitions / press) ---------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid;
  gap: 0.35rem clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-top: 1px solid var(--line);
}
.entry:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 780px) {
  .entry { grid-template-columns: 8rem 1fr auto; align-items: baseline; }
}
.entry__year {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.1;
}
.entry__body h3 {
  font-size: var(--step-1);
  margin: 0 0 0.3rem;
  line-height: 1.25;
}
.entry__body h3 em { font-style: italic; }
.entry__where {
  font-size: var(--step--1);
  color: var(--muted);
  margin: 0;
}
.entry__work { font-size: var(--step--1); color: var(--ink-2); margin: 0.5rem 0 0; }
.entry__award {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid #E2CDBF;
  background: #FAF2EC;
  padding: 0.3em 0.7em;
  margin-top: 0.7rem;
}
.entry__link {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15em;
}
.entry__link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.entry__link::after { content: " ↗"; font-size: 0.9em; }
.entry--upcoming { background: linear-gradient(180deg, #FAF2EC, transparent 70%); }
.tag-upcoming {
  display: inline-block; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; background: var(--accent);
  padding: 0.28em 0.65em; margin-bottom: 0.6rem;
}

/* ---------- Callout card ---------------------------------------------- */

.callout {
  display: grid; gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(1.75rem, 4vw, 3rem);
}
@media (min-width: 820px) { .callout { grid-template-columns: minmax(0, 300px) 1fr; } }
.callout img { width: 100%; border: 1px solid var(--line-soft); }

/* ---------- Quote ------------------------------------------------------ */

.pullquote {
  margin: 0;
  max-width: 34ch;
}
.pullquote blockquote {
  font-family: var(--serif);
  font-size: var(--step-3);
  font-style: italic;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: var(--ink);
}
.section--dark .pullquote blockquote { color: #FBF9F5; }
.pullquote figcaption {
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.section--dark .pullquote figcaption { color: #A69E90; }

/* ---------- Photo grid ------------------------------------------------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
  list-style: none; margin: 0; padding: 0;
}
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-2); }
.photo-grid figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 0.6rem; }
.photo-grid--wide img { aspect-ratio: 3 / 2; }

/* ---------- Fact list --------------------------------------------------- */

.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
  display: grid; gap: 0.15rem 1.5rem;
  padding-block: 1rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
}
@media (min-width: 620px) { .facts li { grid-template-columns: 10rem 1fr; } }
.facts dt, .facts .facts__k {
  font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  font-size: 0.7rem; color: var(--muted);
}
.facts .facts__v { color: var(--ink-2); }

/* ---------- Contact ------------------------------------------------------ */

.contact-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(1.75rem, 4vw, 3rem);
}
.contact-email {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  display: inline-block;
  word-break: break-word;
}
.contact-email:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Footer -------------------------------------------------------- */

.site-footer {
  background: var(--dark);
  color: #B9B3A7;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: var(--step--1);
}
.site-footer__grid {
  display: grid; gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 780px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #8E8778; margin: 0 0 1.1rem;
}
.site-footer__name {
  font-family: var(--serif);
  font-size: var(--step-2);
  color: #FBF9F5; margin: 0 0 0.5rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.6rem; }
.site-footer a { color: #D6D0C4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__legal {
  padding-top: 1.75rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  justify-content: space-between;
  color: #7E7869; font-size: 0.78rem;
}

/* ---------- Lightbox ------------------------------------------------------ */

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(14, 13, 10, 0.94);
  display: grid; grid-template-rows: 1fr auto;
  padding: clamp(1rem, 3vw, 2.5rem);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.lightbox[data-open="true"] { opacity: 1; visibility: visible; }
.lightbox__stage {
  display: grid; place-items: center; min-height: 0;
}
.lightbox__stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8);
}
.lightbox__caption {
  color: #E6E1D6; text-align: center;
  padding-top: 1.25rem; font-size: var(--step--1);
  max-width: 60ch; margin-inline: auto;
}
.lightbox__caption strong {
  font-family: var(--serif); font-style: italic;
  font-size: var(--step-1); font-weight: 600;
  color: #fff; display: block; margin-bottom: 0.25rem;
}
.lightbox__btn {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; cursor: pointer;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 1.2rem; line-height: 1;
  transition: background 0.2s;
}
.lightbox__btn:hover { background: rgba(255,255,255,0.2); }
.lightbox__close { top: clamp(1rem, 3vw, 2.5rem); right: clamp(1rem, 3vw, 2.5rem); }
.lightbox__prev { left: clamp(0.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: clamp(0.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
body.is-locked { overflow: hidden; }

/* ---------- Utilities ------------------------------------------------------ */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 1.5rem; }
.measure { max-width: 62ch; }

@media print {
  .site-header, .site-footer, .filters, .lightbox, .btn-row { display: none !important; }
  body { background: #fff; }
}
