/* Visual reconstruction of WordPress Twenty Nineteen as used on longgone.no */
:root {
  --primary: #0073aa;
  --primary-dark: #005177;
  --text: #111;
  --muted: #767676;
  --bg: #fff;
  --border: #ccc;
  --max: 40rem;
}

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

html { font-size: 22px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: NonBreakingSpaceOverride, "Hoefler Text", "Baskerville Old Face", Garamond, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.6;
  word-wrap: break-word;
}

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

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  padding: 0.25rem 0.5rem;
  z-index: 10;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.site-header,
.site-content,
.site-footer {
  width: min(calc(100% - 2rem), 68rem);
  margin: 0 auto;
}

.site-header {
  padding: 2rem 0 1rem;
}

.site-title {
  margin: 0;
  font-size: 1.6875em;
  font-weight: 700;
  letter-spacing: 0;
}
.site-title a {
  color: var(--text);
  text-decoration: none;
}
.site-title::before {
  background: var(--primary);
  content: "\020";
  display: block;
  height: 2px;
  margin: 1rem 0;
  width: 1em;
}

.site-description {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-style: italic;
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
  font-size: 0.8rem;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--primary);
}

.site-content { padding: 1.5rem 0 3rem; }
.site-main { max-width: var(--max); }

.entry {
  margin: 0 0 3.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}
.entry-header { margin-bottom: 1.25rem; }
.entry-title {
  font-size: 1.6875em;
  line-height: 1.2;
  margin: 0 0 0.4rem;
}
.entry-title a {
  color: var(--text);
  text-decoration: none;
}
.entry-title a:hover { color: var(--primary); }
.entry-meta,
.entry-footer {
  color: var(--muted);
  font-size: 0.7rem;
}
.entry-content p { margin: 0 0 1rem; }
.entry-content h1,
.entry-content h2 { font-size: 1.2em; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 0.6rem;
  margin: 1.5rem 0;
}
.photo-grid.polaroid figure {
  margin: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  padding: 0.4rem 0.4rem 0.6rem;
}
.photo-grid.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f3f3f3;
}
.photo-grid figcaption {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.65rem;
  color: #333;
  text-align: center;
  line-height: 1.3;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 0.75rem;
  max-width: none;
}
.album-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  padding: 0.4rem 0.4rem 0.75rem;
}
.album-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.album-title {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  text-align: center;
}
.album-count {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
  text-align: center;
}

.pagination { margin: 2rem 0; font-size: 0.8rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.page-numbers {
  color: var(--text);
  text-decoration: none;
  padding: 0.15rem 0.35rem;
}
.page-numbers.current { font-weight: 700; }
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  font-size: 0.8rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 2px solid #eee;
  font-size: 0.75rem;
}
.footer-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.footer-widgets h2 { font-size: 1rem; }
.footer-widgets ul { list-style: none; padding: 0; margin: 0; }
.footer-widgets li { margin: 0.35rem 0; }
.site-info { color: var(--muted); margin-top: 1.5rem; }

.search-form { display: flex; gap: 0.4rem; margin: 1rem 0; }
.search-field {
  font: inherit;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  min-width: 14rem;
}
.search-submit {
  font: inherit;
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}
.search-results { list-style: none; padding: 0; }
.search-results li { margin: 0.6rem 0; }
.search-results span { color: var(--muted); font-size: 0.75rem; margin-left: 0.5rem; }
.crumb { font-size: 0.75rem; margin: 0 0 0.4rem; }

/* Lightbox */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  display: none;
  z-index: 1000;
  color: #fff;
}
.lb-overlay.open { display: flex; flex-direction: column; }
.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 1rem;
}
.lb-stage img {
  max-width: min(96vw, 1400px);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem 1rem;
  font-size: 0.8rem;
}
.lb-bar button {
  background: transparent;
  color: #fff;
  border: 1px solid #666;
  font: inherit;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
}
.lb-caption { flex: 1; text-align: center; color: #ddd; }

@media (max-width: 782px) {
  html { font-size: 20px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .album-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-widgets { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  html { font-size: 18px; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
}
