/* Bagmutskiy series — photography archive. Paper + Graphik, same as landings. */

.bagmutskiy-terms .entry-header,
.bagmutskiy-terms-main .entry-header {
  display: none;
}

body.bagmutskiy-terms,
body.bagmutskiy-terms #page,
body.bagmutskiy-terms #content,
body.bagmutskiy-terms #primary,
body.bagmutskiy-terms .site-main,
body.bagmutskiy-terms .ast-container {
  background: #f4f2ee;
}

body.bagmutskiy-terms #primary,
.bagmutskiy-terms-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

html:not(:has(body.sr-has-shell)):not(:has(body.pf-has-shell)) {
  background: #f4f2ee;
}

body.sr {
  margin: 0;
}

.sr {
  --paper: #f4f2ee;
  --paper-2: #ece9e3;
  --ink: #1a1916;
  --muted: #5c5a55;
  --line: #d9d4cb;
  --accent: #1a3a32;
  --measure: 38rem;
  --wide: 72rem;
  --photo: 90rem;
  --font-display: "Graphik Compact", "Graphik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Graphik", "Graphik Compact", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  padding: 0 0 4.5rem;
  overflow-wrap: break-word;
}

.sr :where(h1, h2, h3, p, ul, ol, figure, blockquote) {
  margin: 0;
}

.sr a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(26, 25, 22, 0.28);
}

.sr a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.sr a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-2);
}

.sr-skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-skip:focus {
  position: fixed;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--paper);
  padding: 0.4rem 0.7rem;
}

.sr-preview-chrome {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: baseline;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  max-width: var(--photo);
  margin: 0 auto;
}

body.sr-has-shell .sr-preview-chrome {
  display: none;
}

.sr-preview-chrome span {
  color: var(--muted);
}

.sr-crumb {
  max-width: var(--photo);
  margin: 0 auto;
  padding: 0.55rem 1.25rem 0;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.sr-crumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  list-style: none;
  padding: 0;
}

.sr-crumb li:not(:last-child)::after {
  content: "→";
  margin-left: 0.45rem;
  color: var(--line);
}

.sr-hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.15rem 1.25rem 0.55rem;
}

.sr h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  word-spacing: 0.12em;
  line-height: 1.12;
  font-size: clamp(1.85rem, 5vw, 3rem);
  max-width: 22ch;
  margin: 0;
}

/* Kit `.elementor-kit-1217 h1` is Graphik Compact 48/700; keep that face, not its tracking. */
body.sr-has-shell .sr h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  word-spacing: 0.12em;
  line-height: 1.12;
  font-size: clamp(1.85rem, 5vw, 3rem);
  max-width: 22ch;
  margin: 0;
  color: inherit;
}

.sr-lead {
  max-width: 34rem;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.sr-jump {
  margin-top: 0.45rem;
  font-size: 0.85rem;
}

.sr-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.85rem, 2vw, 1.65rem) clamp(0.9rem, 2.2vw, 1.75rem);
  max-width: var(--photo);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  align-items: start;
}

.sr-edit--uniform {
  grid-template-columns: repeat(3, 1fr);
}

.sr-edit--uniform figure {
  grid-column: auto !important;
}

.sr-edit--masonry figure[data-orient="portrait"] {
  grid-row: span 2;
}

.sr-edit figure[data-slot="hero"],
.sr-edit figure[data-slot="full"],
.sr-edit figure[data-slot="standard"] {
  grid-column: 1 / -1;
}

.sr-edit figure[data-slot="hero"],
.sr-edit figure[data-slot="full"][data-orient="portrait"],
.sr-edit figure[data-slot="standard"][data-orient="portrait"] {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sr-edit figure[data-slot="hero"] img,
.sr-edit figure[data-slot="full"][data-orient="portrait"] img,
.sr-edit figure[data-slot="standard"][data-orient="portrait"] img {
  width: auto;
  max-width: 100%;
  max-height: min(88vh, 52rem);
  height: auto;
}

.sr-edit figure[data-slot="portrait-contained"] {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sr-edit figure[data-slot="portrait-contained"] img {
  width: auto;
  max-width: min(100%, 34rem);
  max-height: min(82vh, 46rem);
  height: auto;
}

.sr-edit figure[data-slot="pair"] {
  grid-column: auto;
}

.sr-privacy {
  max-width: var(--wide);
  margin: 0 auto 1rem;
  padding: 0.7rem 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sr-edit figure[data-slot="break"] {
  grid-column: 1 / -1;
  height: 1.75rem;
  padding: 0;
  background: none;
}

.sr-chapter-block {
  max-width: var(--photo);
  margin: 0 auto;
  padding: 0 0 1.75rem;
}

.sr-chapter {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: var(--photo);
  margin: 0 auto 0.85rem;
  padding: 0 1.25rem;
}

.sr-facet {
  max-width: var(--photo);
  margin: -0.35rem auto 0.85rem;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.95rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.sr-facet a {
  text-decoration: none;
}

.sr-facet a:hover,
.sr-facet a:focus-visible {
  text-decoration: underline;
}

.sr-facet a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink);
}

.sr-facet-n {
  font-variant-numeric: tabular-nums;
  opacity: 0.72;
}

.sr-visually-hidden,
.sr-chapter--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;
}

.sr-textlink {
  display: inline-block;
  margin: 0.25rem 1.1rem 0.25rem 0;
}

.sr-edit figcaption {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 42rem;
}

.sr-series,
.sr-related,
.sr-cta,
.sr-dir,
.sr-proof {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.5rem 1.25rem 2.75rem;
}

.sr h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  margin-bottom: 1.1rem;
}

body.sr-has-shell .sr h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  margin-bottom: 1.1rem;
  color: inherit;
}

.sr-series-grid,
.sr-related-grid,
.sr-dir-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.sr-dir-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem 0.85rem;
}

.sr-card {
  display: block;
  text-decoration: none;
}

.sr-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: var(--focal, 50% 20%);
}

.sr-card-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.86rem;
  line-height: 1.25;
  text-decoration: none;
}

.sr-kicker {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.35rem;
  letter-spacing: 0.01em;
}

.sr-story {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.92rem;
}

.sr-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.25rem 1.25rem 1.75rem;
  font-size: 0.92rem;
}

.sr-pager a {
  text-decoration: none;
}

.sr-pager .sr-pager-all {
  width: 100%;
  color: var(--muted);
  font-size: 0.82rem;
}

.sr-row {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.7rem 0.85rem;
  align-items: center;
  text-decoration: none;
  min-height: 3.4rem;
  padding: 0.15rem 0;
  border-bottom: 1px solid var(--line);
}

.sr-row img {
  width: 3.4rem;
  height: 4.25rem;
  object-fit: cover;
  object-position: var(--focal, 50% 20%);
  aspect-ratio: 4 / 5;
}

.sr-row-name {
  font-size: 0.95rem;
}

.sr-feat-mixed {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.9rem 1rem;
}

.sr-feat-mixed .sr-card:first-child {
  grid-row: span 2;
}

.sr-dir-list {
  display: flex;
  flex-direction: column;
}

body.sr-has-shell .sr-crumb {
  padding-top: 1.35rem;
}

@media (max-width: 640px) {
  body.sr-has-shell .sr-crumb {
    padding-top: 1rem;
  }
}

/* WP chrome must not inherit series content rules. */
body.sr-has-shell {
  background: transparent;
  padding-bottom: 0;
}

body.sr-has-shell .custom-logo,
body.sr-has-shell .elementor-location-header img,
body.sr-has-shell .elementor-location-footer img {
  width: auto;
  max-width: 100%;
  height: auto;
  background: transparent;
}

.sr-dir-group + .sr-dir-group {
  margin-top: 2.25rem;
}

.sr-cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  font-size: 1.02rem;
}

.sr-proof-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.sr-note {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .sr-feat-mixed {
    grid-template-columns: 1fr 1fr;
  }

  .sr-feat-mixed .sr-card:first-child {
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  .sr-dir-grid,
  .sr-series-grid,
  .sr-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sr-edit--uniform {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .sr-edit {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .sr-edit figure[data-slot="pair"] {
    grid-column: 1 / -1;
  }

  .sr-edit--diptych-ok {
    grid-template-columns: 1fr 1fr;
  }

  .sr-edit--diptych-ok figure[data-slot="pair"] {
    grid-column: auto;
  }

  .sr-edit--uniform {
    grid-template-columns: 1fr;
  }

  .sr-dir-grid,
  .sr-series-grid,
  .sr-related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sr-card img {
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 420px) {
  .sr-dir-grid,
  .sr-related-grid,
  .sr-series-grid,
  .sr-feat-mixed {
    grid-template-columns: 1fr 1fr;
  }

  .sr-card-label {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sr * {
    animation: none !important;
    transition: none !important;
  }
}
