/* ─── Synful: layout primitives ─────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.section {
  padding-block: clamp(3rem, 6vw, 6rem);
  position: relative;
}
.section--hero    { padding-block: 0; min-height: 100dvh; display: grid; place-items: center; }
.section--feed    { padding-block: clamp(4rem, 8vw, 8rem); }
.section--about   { background: var(--color-bg-alt); border-block: 1px solid var(--color-line); }
.section--contact-strip {
  padding-block: clamp(4rem, 10vw, 8rem);
  text-align: center;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-line);
}
.section__title { margin: 0; }
.section__lead  { color: var(--color-muted); max-width: 60ch; margin-top: 1rem; }

/* card grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(1.25rem, 2vw, 2rem);
}

/* featured grid (home) — 1 wide hero card + 2 rows of 3 smaller cards.
   Total layout fits exactly 7 posts; collapses to 2 then 1 column on smaller screens. */
.cards--featured {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 1.5vw, 1.5rem);
}
.cards--featured > .card { aspect-ratio: 4 / 3; }
.cards--featured > .card:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}

@media (max-width: 900px) {
  .cards--featured { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards--featured { grid-template-columns: 1fr; }
  .cards--featured > .card,
  .cards--featured > .card:first-child {
    aspect-ratio: 4 / 3;
    grid-column: auto;
  }
}

/* gallery (single post) */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 0.75rem;
}
.gallery__item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-line);
  cursor: zoom-in;
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-med) var(--easing), filter var(--t-med) var(--easing);
}
.gallery__item:hover img { transform: scale(1.05); filter: brightness(1.1); }

/* article body (single + page) */
.article {
  max-width: 75ch;
  margin-inline: auto;
}
.article :where(p, ul, ol, blockquote, figure, pre) { margin-block: 1.25em; }
.article h2, .article h3 { margin-block: 2em 0.5em; }
.article img { border: 1px solid var(--color-line); }
.article a   { color: var(--color-accent); text-decoration: underline; text-underline-offset: 4px; }

.post-hero {
  position: relative;
  min-height: 60vh;
  display: grid;
  align-items: end;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.post-hero__media {
  position: absolute; inset: 0;
}
.post-hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.55) contrast(1.1);
}
.post-hero__inner {
  position: relative;
  padding: clamp(2rem, 6vw, 5rem) 0;
}

/* prev/next */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 4rem);
  border-top: 1px solid var(--color-line);
  padding-top: 2rem;
}
.post-nav a {
  display: block;
  padding: 1rem;
  border: 1px solid var(--color-line);
  transition: border-color var(--t-fast) var(--easing), background var(--t-fast) var(--easing);
}
.post-nav a:hover { border-color: var(--color-line-hi); background: var(--color-bg-alt); }
.post-nav__label { display: block; color: var(--color-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .15em; margin-bottom: .25rem; }
.post-nav__title { font-family: var(--font-display); color: var(--color-accent); font-size: 1.25rem; }
.post-nav .next { text-align: right; }

@media (max-width: 600px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
}
