/*
 * Memoscopio Digital Archive.
 * The old Omeka "Seasons / Winter" theme's colors and layout, made responsive and accessible:
 * readable base font size, sufficient contrast, visible focus, one column on phones.
 */
:root {
  --navy: #1a2944;      /* page background, footer */
  --brown: #514533;     /* links, rules */
  --paper: #f8f9fa;     /* header and content panel */
  --sky: #98c4c9;       /* band around the content panel */
  --teal: #2a6f7a;      /* nav bar (old #56acba, darkened for contrast with white text) */
  --heading: #3f5f69;   /* h1 (old #859ca2, darkened for contrast) */
  --rule: #c9d6d8;
  --width: 50rem;
}

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

body {
  margin: 0;
  font: 1rem/1.6 Verdana, Arial, sans-serif;
  color: #1b1b1b;
  background: var(--navy);
  border-top: 3px solid var(--brown);
}

img, iframe, video { max-width: 100%; }
img { height: auto; }

a { color: var(--brown); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid #e0a100; outline-offset: 2px; }

h1, h2, h3 { line-height: 1.25; }
h1 { color: var(--heading); font-size: 2rem; margin: .5em 0 .6em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

.skip-link {
  position: absolute; left: .5rem; top: -3rem;
  background: var(--paper); color: var(--navy); padding: .5rem 1rem; z-index: 10;
}
.skip-link:focus { top: .5rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- header ---- */
.site-header {
  background: var(--paper);
  max-width: var(--width); margin: 0 auto; padding: .5rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  /* light band across the full width, as in the old theme */
  box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax);
}
.site-title img { display: block; width: 380px; max-width: 100%; }
.site-search { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; flex: 0 1 18rem; }
.site-search label { width: 100%; font-size: .85rem; }
.site-search input { font: inherit; padding: .3rem .4rem; border: 1px solid #767676; width: 12rem; max-width: 60vw; }
.site-search button { font: inherit; padding: .3rem .8rem; border: 0; background: var(--teal); color: #fff; cursor: pointer; }
.site-search button:hover { background: var(--navy); }

/* ---- main navigation ---- */
.primary-nav { background: var(--teal); border-bottom: 6px solid var(--paper); }
.primary-nav ul {
  list-style: none; margin: 0 auto; padding: 0; max-width: var(--width);
  display: flex; flex-wrap: wrap;
}
.primary-nav li { flex: 1 1 auto; }
.primary-nav a {
  display: block; padding: .7rem .8rem; text-align: center;
  color: #fff; text-decoration: none; font-weight: bold;
}
.primary-nav a:hover, .primary-nav a:focus-visible { background: var(--navy); }
/* the current section, from <body id="%%BODYID%%"> */
body[id^="items"] .nav-items a,
body[id^="collections"] .nav-collections a,
body[id^="exhibits"] .nav-exhibits a,
body#about .nav-about a,
body#contribution .nav-contribution a { background: var(--navy); }

/* ---- content panel ---- */
.content {
  display: block; max-width: var(--width); margin: 0 auto;
  background: var(--paper); padding: .5rem 1.5rem 2rem;
  box-shadow: 0 0 0 100vmax var(--sky); clip-path: inset(0 -100vmax);
}
.content p, .content li { max-width: 70ch; }

.exhibit-back { margin: 1rem 0 0; font-size: .9rem; }
.exhibit-back a::before { content: "\2190\00a0"; }

/* ---- home ---- */
#index .content { display: grid; grid-template-columns: 1fr; gap: 0 2rem; }
#index .content h1 { grid-column: 1 / -1; }
.featured { border-bottom: 2px solid var(--brown); padding-bottom: 1rem; }
.featured h2 { margin-bottom: .2em; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--heading); }
.featured h3 { margin-top: 0; }
.featured-item img { float: left; margin: 0 1rem .5rem 0; width: 140px; }
.featured-item::after { content: ""; display: block; clear: both; }
@media (min-width: 46rem) {
  #index .content { grid-template-columns: 1fr 1fr; }
  .featured-item { grid-row: span 2; }
}

/* ---- item pages ---- */
.item-meta {
  display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem;
  margin: 0 0 1.5rem; padding: 1rem 0; border-top: 2px solid var(--brown); border-bottom: 2px solid var(--brown);
}
.item-meta dt { font-weight: bold; }
.item-meta dd { margin: 0; white-space: pre-line; }
.item-meta-other dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; }
.item-meta-other dt { font-weight: bold; }
.item-meta-other dd { margin: 0; }
@media (max-width: 30rem) {
  .item-meta, .item-meta-other dl { grid-template-columns: 1fr; }
  .item-meta dd, .item-meta-other dd { margin-bottom: .5rem; }
}
.item-files { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }
.item-files img { max-height: 24rem; width: auto; border: 1px solid var(--rule); }
.item-tags ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.item-tags li { background: #e4eef0; padding: .15rem .6rem; border-radius: 1rem; font-size: .9rem; }
.citation { font-size: .9rem; overflow-wrap: anywhere; }

/* every converted YouTube embed */
iframe.video {
  display: block; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; height: auto;
  border: 0; margin: 1rem 0; background: #000;
}

/* ---- lists ---- */
.item-list { padding-left: 1.2rem; }
.item-list li { margin: .25rem 0; }
.tag-cloud { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.tag-cloud span { color: #555; font-size: .85rem; }
.browse-links { font-weight: bold; }
.exhibit-sections li { margin: 0 0 1rem; }
.exhibit-sections a { font-weight: bold; }
.collection-summary, .exhibit-summary { border-bottom: 2px solid var(--brown); padding-bottom: 1rem; }

/* ---- exhibit pages ---- */
.exhibit-item { margin: 0 0 1.5rem; }
.exhibit-item-link { display: inline-block; margin-top: .5rem; font-weight: bold; }
.exhibit-pages { margin-top: 2.5rem; padding-top: 1rem; border-top: 2px solid var(--brown); }
.exhibit-pages h2 { font-size: 1.1rem; }
.exhibit-pages ul { columns: 14rem auto; padding-left: 1.2rem; }

/* ---- footer ---- */
.site-footer { color: var(--paper); text-align: center; padding: 1.5rem 1rem 2rem; font-size: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; }
.site-footer a { color: var(--sky); }
.site-footer a:hover { color: #fff; }

@media (max-width: 40rem) {
  body { font-size: 1.05rem; }
  .content { padding: .5rem 1rem 1.5rem; }
  h1 { font-size: 1.6rem; }
  .primary-nav li { flex: 1 1 50%; }
  .site-search { flex: 1 1 100%; flex-wrap: wrap; }
  .site-search input { flex: 1 1 0; min-width: 0; width: auto; max-width: none; }
}

@media print {
  body { background: #fff; border: 0; }
  .site-search, .primary-nav, .site-footer nav, .skip-link, iframe.video { display: none; }
  .content { box-shadow: none; clip-path: none; }
}
