/* ==========================================================================
   PA Digital Cultural Heritage Collaborative — site stylesheet
   Single file, organized by section. ~8 KB target.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --gold: #d7b221;
  --gold-soft: #c9a44c;
  --ink: #192930;
  --mute: #6a6a6a;
  --rule: #e3ddd0;
  --cream: #fafaf7;
  --section: #f7f4ee;
  --max-width: 1080px;
  --gutter: 1.5rem;
  --display: "Archivo Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset + base typography ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 1.5em 0 0.5em; }
h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--gold-soft); }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
blockquote {
  margin: 1em 0;
  padding: 0.5em 1em;
  border-left: 3px solid var(--gold);
  color: #444;
  font-style: italic;
}
blockquote cite { display: block; font-style: normal; font-size: 0.9em; color: var(--mute); margin-top: 0.5em; }
blockquote cite::before { content: "— "; }

/* ---------- Layout: sticky footer container ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.content { flex: 1 0 auto; padding: 2rem 0 3rem; }
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 1rem; top: 1rem; width: auto; height: auto;
  background: var(--ink); color: #fff; padding: 0.5em 1em; z-index: 100;
}

/* ---------- Site header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0 0;
}
.site-branding { text-align: center; padding-bottom: 1rem; }
.site-title { font-family: var(--display); font-size: 2.2rem; font-weight: 700; margin: 0; line-height: 1.1; text-transform: uppercase; letter-spacing: 0.5px; }
.site-title a { color: var(--ink); text-decoration: none; }
.site-tagline { color: var(--mute); font-size: 1rem; margin: 0.4rem 0 0; }

/* ---------- Primary nav ---------- */
.primary-nav { position: relative; }
.nav-toggle {
  display: none;
  background: var(--gold); color: #fff; border: 0; padding: 0.6em 1.2em;
  margin: 0 auto 1rem; font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; cursor: pointer;
}
.nav-toggle:focus { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

.nav-menu, .submenu { list-style: none; margin: 0; padding: 0; }
.nav-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.5rem; padding-bottom: 0.75rem; }
.nav-menu li { position: relative; }
.nav-menu a {
  display: block; padding: 0.6em 0;
  color: var(--gold); font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; text-decoration: none;
  font-size: 0.95rem;
}
.nav-menu a:hover, .nav-menu a:focus { color: var(--gold-soft); }
.nav-menu .current a, .nav-menu .current-section > a { color: var(--ink); }

.has-submenu > a::after {
  content: "▾";
  display: inline-block;
  margin-left: 4px;
  font-size: 0.85em;
  vertical-align: baseline;
}

.submenu {
  position: absolute;
  top: 100%; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--rule); border-top: 3px solid var(--gold);
  min-width: 220px; padding: 0.5em 0;
  display: none; z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.submenu li { display: block; }
.submenu a { padding: 0.4em 1.2em; font-size: 0.88rem; letter-spacing: 0.5px; text-align: left; white-space: nowrap; }
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu,
.has-submenu.is-open > .submenu { display: block; }

/* ---------- Buttons + utilities ---------- */
.button, a.button {
  display: inline-block;
  background: var(--gold); color: #fff; padding: 0.6em 1.4em;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; text-decoration: none; border: 0; cursor: pointer;
}
.button:hover, a.button:hover { background: var(--gold-soft); color: #fff; }
.text-center { text-align: center; }

/* ---------- Page header (single + list) ---------- */
.page-header { margin: 0 0 1.5rem; }
.page-title { margin: 0; font-size: 2rem; }
.page-meta {
  display: flex; flex-wrap: wrap; gap: 0.5em 1.2em;
  font-size: 0.9rem; color: var(--mute);
  margin-top: 0.4em;
}
.page-meta a { color: var(--mute); text-decoration: underline; }
.archive-description { color: var(--mute); margin: 0.5em 0 0; }

/* ---------- Article body ---------- */
.article-body { line-height: 1.6; }
.article-body h2 { margin-top: 1.5em; }
.article-body img { display: block; margin: 1em auto; }
.article-body iframe { max-width: 100%; }

/* ---------- News roll (blog list) ---------- */
.news-roll { display: flex; flex-direction: column; gap: 1.5rem; margin: 1.5rem 0; }
.news-roll__post {
  padding: 1.25rem 1.5rem;
  background: var(--cream);
  border-left: 3px solid var(--gold-soft);
}
.news-roll__title { margin: 0 0 0.35em; font-size: 1.4rem; line-height: 1.25; }
.news-roll__title a { color: var(--ink); text-decoration: none; }
.news-roll__title a:hover { color: var(--gold-soft); }
.news-roll__meta {
  display: flex; flex-wrap: wrap;
  gap: 0.4em 1em;
  font-size: 0.85rem; color: var(--mute);
  margin-bottom: 0.85em;
}
.news-roll__meta a { color: var(--mute); text-decoration: underline; }
.news-roll__excerpt p { margin: 0 0 0.75em; }
.news-roll__more { margin: 0; font-size: 0.9rem; }
.news-roll__more a { font-weight: 700; }

/* ---------- Collection grid ---------- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem; margin: 1.5rem 0;
}
.collection-card {
  background: #fff;
  border: 1px solid var(--rule);
  display: flex; flex-direction: column;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.collection-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); transform: translateY(-2px); }
.collection-card a { text-decoration: none; color: inherit; }
.collection-card__image { aspect-ratio: 1 / 1; overflow: hidden; background: var(--section); }
.collection-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collection-card__body { padding: 1rem 1.25rem 1.25rem; }
.collection-card__title { margin: 0 0 0.35em; font-size: 1.1rem; line-height: 1.3; }
.collection-card__excerpt { margin: 0; font-size: 0.9rem; color: var(--mute); line-height: 1.45; }

/* ---------- Single collection page ---------- */
.collection-featured-image { margin: 0 0 1.5rem; text-align: center; }
.collection-featured-image img { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }

.entry-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--mute); }
.entry-footer .taxonomy { margin: 0.25em 0; }
.entry-footer .taxonomy strong { color: var(--ink); margin-right: 0.5em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.85em; }
.entry-footer a { color: var(--mute); text-decoration: underline; margin-right: 0.5em; }

/* ---------- Archive list (taxonomy + fallback) ---------- */
.archive-list { list-style: none; margin: 1rem 0; padding: 0; }
.archive-list li { padding: 0.5em 0; border-bottom: 1px solid var(--rule); }
.archive-list .title { font-weight: 700; }
.archive-list .date { color: var(--mute); margin-left: 0.5em; font-size: 0.9em; }

/* ---------- Carousel ---------- */
.padchc-carousel {
  position: relative;
  margin: 1.5rem auto 2rem;
  max-width: 760px;
  background: var(--section);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.padchc-carousel__viewport { overflow: hidden; }
.padchc-carousel__track {
  display: flex; list-style: none; margin: 0; padding: 0;
  transition: transform 600ms ease;
  will-change: transform;
}
.padchc-carousel__slide { flex: 0 0 100%; width: 100%; margin: 0; padding: 0; list-style: none; }
.padchc-carousel__slide figure {
  margin: 0; padding: 28px 36px 56px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.padchc-carousel__slide img {
  display: block; max-width: 100%; max-height: 460px; height: auto; width: auto;
  object-fit: contain; background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.padchc-carousel__slide figcaption {
  margin-top: 14px; font-size: 0.92em; font-style: italic;
  color: #4a4a4a; max-width: 560px; line-height: 1.45;
}
.padchc-carousel__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0; z-index: 2; transition: background 150ms ease;
}
.padchc-carousel__nav:hover, .padchc-carousel__nav:focus { background: rgba(0, 0, 0, 0.7); outline: none; }
.padchc-carousel__nav--prev { left: 8px; }
.padchc-carousel__nav--next { right: 8px; }
.padchc-carousel__dots {
  position: absolute; left: 0; right: 0; bottom: 14px;
  display: flex; justify-content: center; gap: 6px; z-index: 2;
}
.padchc-carousel__dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(0, 0, 0, 0.25); cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}
.padchc-carousel__dot:hover { background: rgba(0, 0, 0, 0.5); }
.padchc-carousel__dot[aria-current="true"] { background: #2c5d8a; transform: scale(1.3); }

/* ---------- Site footer ---------- */
.site-footer {
  background: var(--section);
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--mute);
  text-align: center;
}
.site-footer a { color: var(--gold-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .site-title { font-size: 1.6rem; }
  .nav-toggle { display: inline-block; }
  .nav-menu { display: none; flex-direction: column; gap: 0; align-items: stretch; }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a { padding: 0.7em 1rem; text-align: center; border-top: 1px solid var(--rule); }
  .submenu {
    position: static; transform: none;
    border: 0; border-top: 1px solid var(--rule);
    box-shadow: none; padding: 0; min-width: 0;
    background: var(--cream);
  }
  .has-submenu > a::after { content: ""; }
  .padchc-carousel__slide figure { padding: 18px 18px 48px; }
  .padchc-carousel__slide img { max-height: 320px; }
  .padchc-carousel__nav { width: 32px; height: 32px; font-size: 20px; }
}
