/* Hobbitarn — styles taken from the design export in design/ */
:root {
  --band: #4A1515;
  --band-text: #F4EAE0;
  --band-link: #E9B98C;
  --band-link-hover: #F6D7B6;
  --band-soft: #E6D6CC;
  --band-muted: #CDB3AA;
  --page: #F5EFE6;
  --text: #2A1414;
  --text-2: #4A3632;
  --muted: #6B5550;
  --accent: #8A2A1E;
  --accent-hover: #5E1A12;
  --rule: rgba(42, 20, 20, 0.16);
  --tile: #E9E1D7;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--band-link); outline-offset: 3px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.caps {
  font-size: 16px;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
}
.caps-lg {
  font-size: 17px;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.16em;
}
.plain { text-decoration: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Band (dark red header) ---------- */
.band { background: var(--band); color: var(--band-text); }
.band a { color: var(--band-link); }
.band a:hover { color: var(--band-link-hover); }
.band-inner {
  display: flex; flex-direction: column; gap: 96px;
  padding-top: 40px; padding-bottom: 96px;
}
.band--overlap .band-inner { padding-bottom: 168px; }
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 32px;
}
.site-header .logo { display: block; line-height: 0; }
.site-header .logo img { height: 48px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.band .site-nav a { color: var(--band-text); text-decoration: none; padding: 10px 0; }
.band .site-nav a[aria-current="page"] { color: var(--band-link); }
.band .site-nav a:hover { color: var(--band-link-hover); }

.intro { display: flex; flex-direction: column; gap: 24px; }
.intro--home { gap: 28px; }
.eyebrow { margin: 0; color: var(--band-link); }
.page-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(64px, 10vw, 132px);
  line-height: 0.88;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}
.page-title--post { font-size: clamp(52px, 7.5vw, 100px); line-height: 0.9; }
.page-title--post.page-title--long { font-size: clamp(44px, 6vw, 80px); line-height: 0.95; }
.band .page-title a { color: var(--band-text); text-decoration: none; }
.page-title em { font-style: italic; color: var(--band-link); }
.subtitle {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  color: var(--band-soft);
}
.band-meta { margin: 0; color: var(--band-muted); }
.back-link { align-self: flex-start; padding: 6px 0; text-decoration: none; }

/* ---------- Body ---------- */
.content { display: flex; flex-direction: column; gap: 96px; padding-bottom: 64px; }
.content--padded { padding-top: 96px; }
.lead-photo {
  display: block; margin: -120px 0 0; line-height: 0;
  background: #fff; padding: 24px;
  box-shadow: 0 24px 48px rgba(60, 20, 20, 0.18);
}
.lead-photo img, .lead-photo picture { width: 100%; height: auto; display: block; }
@media (max-width: 520px) {
  .lead-photo { padding: 12px; }
}

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 16px; color: var(--muted);
  border-top: 1px solid var(--rule); padding-top: 24px;
}
.site-footer--bare { border-top: 0; padding-top: 0; }
.site-footer a { text-decoration: none; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* ---------- Home ---------- */
.feature { display: flex; flex-direction: column; gap: 20px; }
.feature .more { align-self: flex-start; padding: 8px 0; text-decoration: none; }
.list-heading { margin: 0 0 8px; font-weight: 400; color: var(--muted); }
.post-list { display: flex; flex-direction: column; }
.post-item {
  display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--rule); padding: 36px 0 44px;
}
.post-item:last-child { border-bottom: 1px solid var(--rule); }
.post-item .meta { margin: 0; color: var(--muted); }
.post-item h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.post-item h3 a { color: var(--text); text-decoration: none; }
.post-item h3 a:hover { color: var(--accent); }
.post-item .summary { margin: 0; max-width: 620px; color: var(--text-2); }

/* ---------- Year-grouped lists (events, archive) ---------- */
.years { display: flex; flex-direction: column; gap: 80px; }
.year { display: flex; flex-wrap: wrap; gap: 8px 48px; }
.year h2 {
  flex: 0 0 200px; margin: 0;
  font-family: var(--display); font-weight: 500;
  font-size: 88px; line-height: 0.9; letter-spacing: -0.02em;
  color: var(--muted);
}
.year:first-child h2 { color: var(--accent); }
.year-items { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.entry {
  display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--rule); padding-top: 20px;
}
.entry .name {
  font-family: var(--display); font-size: 44px; font-weight: 500; line-height: 1;
}
.entry .name a { color: var(--text); text-decoration: none; }
.entry .name a:hover { color: var(--accent); }
.entry .result {
  font-family: var(--display); font-style: italic; font-size: 28px; font-weight: 500;
  line-height: 1.2; color: var(--accent);
}
.entry .links { color: var(--muted); }
.entry .links a { text-decoration: none; }
.year-items--compact { gap: 28px; }
.year-items--compact .name { font-size: 34px; line-height: 1.05; }

/* ---------- Post ---------- */
.post { display: flex; flex-direction: column; gap: 40px; }
.prose { min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose > p:first-child {
  max-width: 640px; margin: 0 auto 1.2em;
  font-family: var(--display); font-size: 30px; font-weight: 500; line-height: 1.3;
}
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.1em; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--display); font-weight: 500; line-height: 1.05;
  margin: 1.6em 0 0.5em;
}
.prose h1 { font-family: var(--display); font-weight: 500; font-size: 48px; line-height: 1; margin: 1.4em 0 0.5em; }
.prose h2 { font-size: 44px; }
.prose h3 { font-size: 32px; }
.prose h4 { font-size: 26px; }
.prose img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.prose picture { display: block; }
.prose p > img, .prose p > picture { margin: 1.6em 0; }
.prose figure { margin: 1.6em 0; }
.prose figcaption, .prose .caption {
  margin-top: 10px; font-size: 16px; color: var(--muted); font-style: italic; line-height: 1.4;
}
.prose blockquote {
  margin-left: 0; padding-left: 24px; border-left: 2px solid var(--rule); color: var(--text-2);
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.prose iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; margin: 1.6em 0; }
.prose li + li { margin-top: 0.3em; }
/* WordPress galleries come through as lists of photos: lay them out in a grid. */
.prose ul:has(> li > p > img, > li > p > picture, > li > img, > li > picture) {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px;
}
.prose ul:has(> li > p > img, > li > p > picture) li { margin: 0; }
.prose ul:has(> li > p > img, > li > p > picture) p { margin: 0; }
.prose ul:has(> li > p > img, > li > p > picture) img { aspect-ratio: 1; object-fit: cover; height: 100%; margin: 0; }

.ext-link { margin: 0; }
.ext-link a { text-decoration: none; }

.competition {
  display: flex; flex-direction: column; gap: 0;
  border-top: 1px solid var(--rule); padding-top: 32px;
}
.competition .label { margin: 0; color: var(--muted); }
.competition .event {
  margin: 0; font-family: var(--display); font-size: 44px; font-weight: 500; line-height: 1;
}
.competition .result {
  margin: 0; font-family: var(--display); font-style: italic; font-size: 28px; font-weight: 500;
  line-height: 1.2; color: var(--accent);
}
.competition .stack {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 0 24px; border-bottom: 1px solid var(--rule);
}
.competition .stack:last-of-type { border-bottom: 0; }
.competition .event { font-size: 38px; line-height: 1.05; }
.competition .result { font-size: 24px; }
.competition .event a { color: var(--text); text-decoration: none; }
.competition .event a:hover { color: var(--accent); }
.competition .when { margin: 0; color: var(--muted); }
.competition figure { margin: 0 0 24px; line-height: 0; }
.competition .links { margin: -8px 0 24px; }
.competition .links a { text-decoration: none; }
.competition .sep { color: var(--muted); padding: 0 10px; }

.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  border-top: 1px solid var(--rule); padding-top: 24px;
}
.post-nav a { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.post-nav .dir { color: var(--muted); }
.post-nav .t { font-family: var(--display); font-size: 26px; font-weight: 500; line-height: 1.1; color: var(--text); }
.post-nav a:hover .t { color: var(--accent); }
.post-nav .next { text-align: right; grid-column: 2; }

/* ---------- Gallery ---------- */
.gallery-section { padding-top: 96px; }
.photos-head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 24px; }
.photos-intro { margin: 0; font-family: var(--display); font-style: italic; font-size: 28px; font-weight: 500; line-height: 1.2; color: var(--text-2); }
.gallery-main { padding: 0 4px; }
.entry-extra { margin: 40px 0 0; max-width: 520px; }
.entry-extra img, .entry-extra picture { display: block; width: 100%; height: auto; }
.entry-extra figcaption { margin-top: 10px; font-size: 16px; color: var(--muted); font-style: italic; }
.mosaic {
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 9vw; grid-auto-flow: dense; gap: 4px;
}
@media (max-width: 1400px) { .mosaic { grid-template-columns: repeat(5, 1fr); grid-auto-rows: 11vw; } }
@media (max-width: 1100px) { .mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 14vw; } }
@media (max-width: 800px) { .mosaic { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 19vw; } }
@media (max-width: 520px) { .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 22vw; } }
.mosaic .port { grid-row: span 2; }
.mosaic .land { grid-column: span 2; }
.mosaic .wide { grid-area: span 2 / span 2; }
.mosaic .tall { grid-row: span 3; }
.mosaic .big { grid-area: span 3 / span 2; }
.mosaic .hero { grid-area: span 2 / span 3; }
@media (max-width: 520px) { .mosaic .hero { grid-area: span 1 / span 2; } }
.mosaic a {
  display: block; background: var(--tile); cursor: zoom-in; overflow: hidden; min-height: 0;
}
.mosaic a[hidden] { display: none; }
.mosaic img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s, opacity 0.4s;
}
.mosaic a:hover img { transform: scale(1.03); opacity: 0.92; }
.show-more {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 0 0;
}
.show-more[hidden] { display: none; }
.show-more button {
  min-height: 48px; padding: 0 28px; background: transparent;
  border: 1px solid rgba(42, 20, 20, 0.35); border-radius: 4px; color: var(--text);
  font-family: var(--body); font-size: 16px; cursor: pointer;
}
.show-more button:hover { border-color: var(--text); }
.show-more .count { font-size: 14px; color: var(--muted); }
.gallery-footer { padding-top: 72px; padding-bottom: 64px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(20, 5, 5, 0.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px;
  touch-action: pan-y pinch-zoom;
}
.lightbox[hidden] { display: none; }
.lightbox .bar {
  position: absolute; top: 16px; left: 24px; right: 16px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; color: var(--band-muted);
}
.lightbox img { max-width: min(100%, 1600px); max-height: 80vh; object-fit: contain; }
.lightbox .controls { display: flex; gap: 12px; }
.lightbox button {
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--band-text); cursor: pointer;
}
.lightbox .close { width: 44px; height: 44px; border: 0; }
.lightbox .controls button {
  width: 48px; height: 48px; border: 1px solid rgba(244, 234, 224, 0.3); border-radius: 999px;
}
.lightbox .controls button:hover { border-color: var(--band-text); }

/* ---------- Sidebar ---------- */
.wrap--wide { max-width: 1200px; }
.with-sidebar { display: flex; flex-direction: column; gap: 80px; }
.main-col { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 48px; }
@media (min-width: 1000px) {
  .with-sidebar {
    display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; align-items: start;
  }
  /* Main column keeps the design's reading width; sidebar starts below the band */
  .band--overlap + .content .sidebar { padding-top: 40px; }
}
.side-section { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--rule); padding-top: 16px; }
.side-heading { margin: 0; font-weight: 400; color: var(--muted); }
.side-list, .side-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.side-list { gap: 16px; }
.side-list li { display: flex; flex-direction: column; gap: 2px; }
.side-list a, .side-list .side-title {
  font-family: var(--display); font-size: 23px; font-weight: 500; line-height: 1.1;
  color: var(--text); text-decoration: none;
}
.side-list a:hover { color: var(--accent); }
.side-meta { font-size: 14px; color: var(--muted); }
.side-links { gap: 6px; font-size: 17px; }
.side-links a { text-decoration: none; }
.side-more { align-self: flex-start; text-decoration: none; font-size: 15px; }

/* Event page: my entries + Demon Bingo card */
.event-entries { display: flex; flex-direction: column; gap: 56px; padding-top: 64px; }
@media (min-width: 1000px) {
  .event-entries { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; align-items: start; }
  .event-entries--solo { grid-template-columns: minmax(0, 1fr); }
}
.entries { display: flex; flex-direction: column; gap: 16px; }
.entry-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.entry-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.entry-photo {
  display: block; line-height: 0; background: #fff; padding: 10px; margin-bottom: 8px;
  box-shadow: 0 12px 28px rgba(60, 20, 20, 0.14);
}
.entry-photo img, .entry-photo picture { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; }
.entry-title { font-family: var(--display); font-size: 30px; font-weight: 500; line-height: 1.05; }
.entry-card:hover .entry-title { color: var(--accent); }
.entry-result { font-family: var(--display); font-style: italic; font-size: 21px; font-weight: 500; line-height: 1.2; color: var(--accent); }
.bingo { display: flex; flex-direction: column; gap: 16px; }
.bingo iframe { margin: 0; }

/* Home page list: small cover photo beside each post */
.post-text { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.post-thumb {
  display: block; line-height: 0; background: #fff; padding: 8px;
  box-shadow: 0 10px 24px rgba(60, 20, 20, 0.12);
}
.post-thumb img, .post-thumb picture { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.post-item--thumb .post-thumb { width: 160px; }
@media (min-width: 700px) {
  .post-item--thumb { flex-direction: row; align-items: flex-start; gap: 32px; }
  .post-item--thumb .post-thumb { flex: 0 0 200px; width: 200px; }
}
.side-banner a { display: block; line-height: 0; }
.side-banner img { display: block; width: 100%; max-width: 250px; height: auto; }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  body { font-size: 18px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .band-inner { gap: 48px; padding-top: 24px; padding-bottom: 56px; }
  .band--overlap .band-inner { padding-bottom: 112px; }
  .lead-photo { margin-top: -80px; }
  .site-header { flex-wrap: nowrap; gap: 16px; }
  .site-header .logo img { height: 36px; }
  .site-nav { flex-wrap: nowrap; gap: 18px; font-size: 14px; }
  .intro, .intro--home { gap: 16px; }
  .eyebrow { font-size: 15px; }
  .page-title { font-size: clamp(44px, 13vw, 64px); line-height: 0.92; }
  .page-title--post { font-size: clamp(40px, 11vw, 52px); }
  .page-title--post.page-title--long { font-size: clamp(34px, 9.5vw, 44px); }
  .subtitle { font-size: 22px; }
  .content { gap: 64px; }
  .content--padded { padding-top: 56px; }
  .prose > p:first-child { font-size: 23px; }
  .prose h2 { font-size: 34px; }
  .prose h3 { font-size: 27px; }
  .post-item { padding: 28px 0 32px; }
  .post-item h3 { font-size: 32px; }
  .year h2 { flex-basis: 100%; font-size: 56px; }
  .entry .name { font-size: 32px; }
  .entry .result { font-size: 22px; }
  .competition .event { font-size: 30px; }
  .competition .result { font-size: 21px; }
  .entry-cards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .entry-title { font-size: 22px; }
  .entry-result { font-size: 17px; }
  .entry-photo { padding: 6px; }
  .event-entries { padding-top: 40px; gap: 40px; }
  .gallery-section { padding-top: 56px; }
  .post-nav .t { font-size: 21px; }
}
@media (max-width: 370px) {
  .site-header .logo img { height: 30px; }
  .site-nav { gap: 12px; font-size: 13px; letter-spacing: 0.1em; }
}

/* Footer */
.footer-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; margin-left: auto; }
@media (max-width: 700px) {
  .site-footer { flex-direction: column; align-items: center; text-align: center; gap: 24px; padding-bottom: 32px; }
  .footer-meta { flex-direction: column; align-items: center; gap: 10px; margin-left: 0; align-self: stretch; }
  .footer-meta .byline { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--rule); align-self: stretch; }
  .gallery-footer { padding-top: 56px; }
}
