/* Self-hosted fonts (originally sourced from fonts.bunny.net). */
@import url("/assets/fonts/fonts.css");

:root {
  --color-heading: #54595F;   /* Elementor kit "secondary" — used for headings on white */
  --color-text: #7A7A7A;      /* Elementor kit "text" */
  --color-accent: #61CE70;    /* Elementor kit "accent" — buttons */
  --color-peach:  #FFBC7D;    /* Warm accent from kit */
  --color-link: #54595F;
  --color-link-hover: #61CE70;
  --color-overlay-text: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-soft: #F7F6F3;

  --font-heading: "Kurale", Georgia, serif;
  --font-body: "Montserrat", system-ui, -apple-system, sans-serif;

  --content-max: 1140px;
  --gutter: 1.25rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1em; }

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--color-link-hover); }

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

/* -------------------------------------------------------- layout */

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-main {
  padding: 2.5rem 0 4rem;
  min-height: 60vh;
}

/* -------------------------------------------------------- header */

.site-header {
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-heading);
}
.site-brand__name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.site-brand__tag {
  font-size: 0.875rem;
  color: var(--color-text);
  font-style: italic;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.site-nav a {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 30px;
  opacity: 0.85;
  color: var(--color-heading);
  font-size: 0.95rem;
  transition: opacity 120ms ease, background 120ms ease, font-weight 120ms ease;
}
.site-nav a:hover {
  opacity: 1;
  font-weight: 800;
  color: var(--color-heading);
}

/* -------------------------------------------------------- footer */

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text);
}

/* -------------------------------------------------------- landing card grid */

.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-soft);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.08);
  color: inherit;
}
.card__media {
  aspect-ratio: 16 / 10;
  background: #EEE;
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}
.card:hover .card__media img { transform: scale(1.03); }

.card__body {
  padding: 1rem 1.25rem 1.25rem;
}
.card__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--color-heading);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}
.card__meta {
  font-size: 0.8rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* -------------------------------------------------------- post layout */

.post {
  max-width: 840px;
  margin: 0 auto;
}
/* PDF posts need more horizontal room than prose -- a US-letter page at
   100% zoom is ~816px wide, plus PDF.js padding/scrollbar pushes the
   minimum iframe width to ~860px. Mixed-page-size PDFs (cover at one
   size, body pages at letter) can overflow even more. Give them up to
   1100px when the viewport allows. */
.post:has(.post__pdf) {
  max-width: min(100vw - 2rem, 1100px);
}
.post__header {
  text-align: center;
  margin-bottom: 2rem;
}
.post__title {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}
.post__meta {
  font-size: 0.85rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post__media {
  margin: 0 0 1.5rem;
}
.post__video,
.post__embed {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  border: 0;
}
.post__pdf {
  width: 100%;
  height: 86vh;
  min-height: 600px;
  border: 1px solid rgba(0,0,0,0.1);
}
.post__download {
  margin-top: 0.75rem;
  text-align: center;
}
.post__download a {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--color-accent);
  color: #FFF;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-weight: 500;
  transition: background 120ms ease;
}
.post__download a:hover { background: #4db359; color: #FFF; }

.post__gallery {
  columns: 3 260px;
  column-gap: 10px;
  margin: 0;
  padding: 0;
}
.post__gallery figure {
  break-inside: avoid;
  margin: 0 0 10px;
  position: relative;
  overflow: hidden;
}
.post__gallery img {
  width: 100%;
  display: block;
  transition: transform 240ms ease;
}
.post__gallery a {
  display: block;
  position: relative;
}
.post__gallery a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}
.post__gallery a:hover::after,
.post__gallery a:focus-visible::after { opacity: 1; }
.post__gallery a:hover img,
.post__gallery a:focus-visible img { transform: scale(1.03); }

/* Lightbox overlay */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  object-fit: contain;
  display: block;
  cursor: zoom-out;
}
.lightbox__caption {
  color: #ddd;
  font-size: 0.9rem;
  text-align: center;
  font-style: italic;
  max-width: 60ch;
}
.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem 0.9rem;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.lightbox button:hover { opacity: 1; }
.lightbox button:disabled { opacity: 0.2; cursor: default; }
.lightbox__close { top: 1rem; right: 1rem; font-size: 2.6rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 720px) {
  .post__gallery { columns: 2 160px; }
  h1 { font-size: 1.75rem; }
  .post__title { font-size: 1.5rem; }
}
