/* =============================================
   NOVENARIK — site.css
   Matches the Figma Sites original:
   - Background: #cbd5ca (sage green)
   - Dark sections: #292d25
   - Body text: rgba(46,46,46,0.75)
   - Fonts: Geist (headings/labels) + Bitter (body)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&family=Geist:wght@400;600;700&display=swap');

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; width: 100%; }
body { margin: 0; width: 100%; background-color: #cbd5ca; font-family: 'Bitter', serif; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5,h6,p,figure { margin: 0; font-size: inherit; font-weight: inherit; }
ol,ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { border: none; background: none; padding: 0; cursor: pointer; }

/* ---- CSS Variables ---- */
:root {
  --bg:        #cbd5ca;
  --bg-dark:   #292d25;
  --text:      rgba(46, 46, 46, 0.75);
  --text-dim:  rgba(46, 46, 46, 0.45);
  --text-dark: rgba(255, 255, 255, 0.3);
  --accent:    #39452e;
  --border:    rgba(46, 46, 46, 0.1);
  --border-dark: rgba(255, 255, 255, 0.2);
  --card-bg:   #f5f5f5;
  --max-w:     1280px;
  --max-w-content: 840px;
}

/* ---- Typography ---- */
.label {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  color: var(--text);
}

.label-sm {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}

.label-dark {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  color: var(--text-dark);
}

.body-text {
  font-family: 'Bitter', serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

.body-italic {
  font-style: italic;
}

/* ---- Layout ---- */
.page-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-w);
}

.content-wrap {
  width: 100%;
  max-width: var(--max-w-content);
}

/* ---- Header ---- */
#site-header {
  width: 100%;
  display: flex;
  justify-content: center;
}

.site-header {
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 164px; /* 20px pad + 36px logo + 164px gap = 220px = left edge of 840px column */
}

.logo-img-wrap {
  width: 36px;
  height: 58px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-masthead {
  position: absolute;
  width: 222.22%;
  height: 138.82%;
  left: -58.33%;
  top: -19.41%;
  max-width: none;
}

.logo-wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.045px;
  text-transform: uppercase;
  color: rgba(57, 69, 46, 0.8);
}

.logo-tagline {
  font-family: 'Bitter', serif;
  font-weight: 500;
  font-style: italic;
  font-size: 9px;
  letter-spacing: -0.045px;
  color: rgba(57, 69, 46, 0.5);
}

.logo-sep,
.logo-est {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: -0.045px;
  text-transform: uppercase;
  color: #39452e;
}

.site-nav a {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: -0.05px;
  text-transform: uppercase;
  color: rgba(46, 46, 46, 0.7);
  transition: opacity 0.15s;
}

.site-nav a:hover { opacity: 0.5; }

@media (min-width: 1280px) {
  .site-header {
    padding-right: 220px; /* align nav with right edge of 840px column */
  }
}

/* ---- Divider ---- */
.rule {
  width: 100%;
  height: 3px;
  background: transparent;
  border-top: 3px solid var(--border);
  position: relative;
}

.rule-dark {
  border-top-color: var(--border-dark);
}

/* ---- Post card (archive/fallback list) ---- */
.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
}

.post-card:hover .post-card-thumb img { opacity: 0.85; }

.post-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--card-bg);
  overflow: hidden;
  border-radius: 8px;
}

.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.post-card-dash {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.36px;
  color: var(--text);
}

.post-card-excerpt {
  font-family: 'Bitter', serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

.post-card-date {
  font-family: 'Geist', sans-serif;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ---- Index post feed ---- */
.post-feed {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 60px;
}

.feed-post {
  width: 100%;
  max-width: var(--max-w-content);
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px 0 60px;
  border-top: 3px solid var(--border);
}

.feed-post-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.feed-post-link {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  transition: opacity 0.15s;
}

.feed-post-link:hover { opacity: 0.5; }

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-dark);
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 60px 16px;
}

.footer-inner {
  max-width: var(--max-w-content);
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-title {
  width: 197px;
  flex-shrink: 0;
}

.footer-cols {
  flex: 1;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-col p {
  font-family: 'Bitter', serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dark);
  white-space: pre-wrap;
}

/* ---- Post page ---- */
.post-page {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 20px 60px;
}

.post-page-inner {
  width: 100%;
  max-width: var(--max-w-content);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.post-hero {
  width: 100%;
  max-height: 640px;
  overflow: hidden;
  border-radius: 8px;
}

.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Two-column text (bilingual posts) */
.post-text-cols {
  display: flex;
  gap: 20px;
}
.post-text-cols > * { flex: 1 0 0; }

@media (max-width: 719px) {
  .post-text-cols { flex-direction: column; }
}

.post-body p {
  font-family: 'Bitter', serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1em;
}

.post-body p:last-child { margin-bottom: 0; }

.post-body em { font-style: italic; }

.post-content img,
.feed-post img {
  width: 100%;
  border-radius: 8px;
}

.post-body img {
  margin: 8px 0;
}

.post-body figcaption {
  font-family: 'Bitter', serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-dim);
  text-align: center;
  margin-top: 4px;
}

/* ---- Post navigation ---- */
.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px 0;
  border-top: 3px solid var(--border);
  gap: 20px;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 45%;
}

.post-nav-item.next { align-items: flex-end; text-align: right; }

.post-nav-label {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.post-nav-title {
  font-family: 'Bitter', serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  transition: opacity 0.15s;
}

.post-nav-item:hover .post-nav-title { opacity: 0.5; }

/* ---- Archive page ---- */
.archive-list {
  padding: 0 20px 60px;
}

.archive-year {
  margin-bottom: 40px;
}

.archive-year-label {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.archive-entry {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(46,46,46,0.05);
  transition: opacity 0.15s;
}

.archive-entry:hover { opacity: 0.6; }

.archive-entry-date {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 80px;
}

.archive-entry-title {
  font-family: 'Bitter', serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* ---- About page ---- */
.about-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 20px 40px;
}

.about-inner {
  width: 100%;
  max-width: var(--max-w-content);
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 48px;
  border-top: 3px solid var(--border);
}

.about-photo-wrap {
  width: 100%;
}

.about-photo {
  width: 100%;
  height: 225px;
  object-fit: cover;
  display: block;
}

@media (min-width: 720px) {
  .about-photo-wrap { width: 412px; }
  .about-photo { height: 282px; }
}

.about-label-row {
  display: flex;
  align-items: center;
}

.about-two-col,
.about-three-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-rule-below {
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(46, 46, 46, 0.3);
}

.about-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 550px;
}

.about-col .body-text {
  margin-bottom: 0.75em;
}

.about-col .body-text:last-child { margin-bottom: 0; }

.about-link {
  display: block;
  text-decoration: underline;
  text-underline-position: from-font;
  text-decoration-thickness: from-font;
  margin-bottom: 0 !important;
  line-height: 1.75;
}

.about-link:hover { opacity: 0.6; }

@media (min-width: 720px) {
  .about-two-col  { flex-direction: row; gap: 48px; }
  .about-three-col { flex-direction: row; gap: 48px; }
  .about-col { flex: 1 0 0; max-width: 550px; }
}

/* ---- Lightbox ---- */
.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lb-overlay.is-open { display: flex; }
.lb-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0;
}
.lb-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Bitter', serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  max-width: 600px;
  pointer-events: none;
}

/* ---- Gallery grid (equal-height crop) ---- */
.post-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.post-gallery figure { margin: 0; }
.post-gallery figure img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  border-radius: 8px;
}
.post-gallery figcaption {
  font-family: 'Bitter', serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-dim);
  text-align: center;
  margin-top: 4px;
}

/* ---- Gallery masonry (preserves aspect ratios) ---- */
.post-gallery-masonry {
  columns: 3;
  column-gap: 4px;
}
.post-gallery-masonry figure {
  break-inside: avoid;
  margin: 0 0 4px 0;
}
.post-gallery-masonry figure img {
  width: 100%;
  display: block;
  cursor: zoom-in;
  border-radius: 8px;
}
.post-gallery-masonry figcaption {
  font-family: 'Bitter', serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-dim);
  text-align: center;
  margin-top: 4px;
  margin-bottom: 8px;
}

@media (max-width: 719px) {
  .post-gallery { grid-template-columns: repeat(2, 1fr); }
  .post-gallery-masonry { columns: 2; }
}

/* ---- Featured links grid ---- */
.featured-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.featured-links-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.featured-links-item .fl-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
}
.featured-links-item .fl-title {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity 0.15s;
}
.featured-links-item .fl-title:hover { opacity: 0.5; }
.featured-links-item .fl-blurb {
  font-family: 'Bitter', serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}

@media (max-width: 719px) {
  .featured-links { grid-template-columns: 1fr; }
}

/* ---- Video embed ---- */
.post-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.post-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
