/* ============================================================
   One gutter, one place.

   `main` is a plain full-width flow container: it has no padding of
   its own, so the container inside it is the single source of the
   left/right gutter. That keeps every block aligned on the same
   axis, and lets an alignfull block (the hero) actually reach the
   screen edge instead of being cancelled by a doubled inset.
   ============================================================ */
.wp-site-blocks > main {
  margin-block-start: 0;
  padding-left: 0;
  padding-right: 0;
}

/* ============================================================
   Page-level templates: page head, press index, single artwork,
   artwork archive grid.
   ============================================================ */

/* ---- Page head: H1 + count + lede.
        Source: portfolio-v1-archive-grid.html lines 147-171 ---- */
.page-head { padding: 96px 0; }
.page-head__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.page-head__count {
  color: var(--wp--preset--color--on-surface-variant, #4c4546);
  padding-bottom: 14px;
}
.page-head__lede {
  margin-top: 32px;
  font-size: var(--wp--preset--font-size--body-lg, 18px);
  line-height: 1.6;
  max-width: 60ch;
}

/* ---- Press: the ten links become a hairline-ruled index.
        The page content itself is never rewritten. ---- */
.press-index .wp-block-post-content > p,
.press-index .wp-block-freeform p {
  padding: 24px 0;
  margin: 0;
  max-width: none;
  border-top: var(--od-hairline-soft);
  font-size: var(--wp--preset--font-size--body-lg, 18px);
  line-height: 1.6;
}
.press-index .wp-block-post-content > p:last-child,
.press-index .wp-block-freeform p:last-child {
  border-bottom: var(--od-hairline-soft);
}
.press-index a { text-decoration: none; }
.press-index a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* Outbound marker - every link on this page goes off-site. */
.press-index a[href^="http"]:not([href*="dementieva-art.com"])::after {
  content: " \2197";
  color: var(--wp--preset--color--on-surface-variant, #4c4546);
}

/* ---- Single artwork ---- */
.artwork-single__back {
  display: inline-block;
  padding: 32px 0;
  text-decoration: none;
}
.artwork-single__back:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.artwork-single .wp-block-post-featured-image img {
  border: var(--od-hairline);
  display: block;
}
.artwork-plaque {
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 16px 0 48px;
  border-bottom: var(--od-hairline-soft);
  color: var(--wp--preset--color--on-surface-variant, #4c4546);
}

/* Artwork bodies were authored under the old theme and contain wide
   image stacks. Keep them readable without rewriting content. */
.artwork-single .wp-block-post-content { padding-top: 48px; }
.artwork-single .wp-block-post-content figure { margin-block: 32px; }

/* ---- Artwork archive grid (core/query, layout grid) ---- */
.artwork-archive .wp-block-post-template {
  gap: 64px var(--od-gutter);
}
.artwork-archive .wp-block-post-featured-image {
  border: var(--od-hairline);
  overflow: hidden;
  margin-bottom: 16px;
}
.artwork-archive .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 200ms ease-out;
}
.artwork-archive li:hover .wp-block-post-featured-image img { opacity: 0.88; }
.artwork-archive .wp-block-post-title {
  font-size: var(--wp--preset--font-size--body-lg, 18px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.artwork-archive .wp-block-post-title a { text-decoration: none; }
.artwork-archive li:hover .wp-block-post-title a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* ---- 404 / search ---- */
.dem-centered { padding: 160px 0; }

@media (max-width: 900px) {
  .page-head { padding: 56px 0; }
  .artwork-archive .wp-block-post-template { gap: 48px var(--od-gutter); }
}
