/* ============================================================
   BAGMUTSKIY · EDITORIALS
   Sibling of the homepage visual family, not a copy.
   Paper / ink. Photography carries colour. Larger masthead.
   ============================================================ */

:root {
  --paper: #f4f2ee;
  --paper-2: #eae6df;
  --paper-3: #fffdfa;
  --ink: #16130f;
  --muted: #5b564e;
  --muted-2: #6b655c;
  --line: #dcd6cb;
  --cta: #16130f;
  --cta-hover: #383129;
  --focus: #1b4fd8;
  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shell: 1360px;
  --rail-w: min(var(--shell), 100% - 2rem);
  --measure: 38rem;
  --header-h: 56px;
  --admin-bar-h: 0px;
  --fs-display: clamp(2.85rem, 11.5vw, 7.75rem);
  --fs-h1: clamp(1.5rem, 2.6vw, 2.125rem);
  --fs-h2: clamp(1.25rem, 2vw, 1.75rem);
  --fs-h3: 1.125rem;
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-label: 0.6875rem;
  --sec-y: clamp(3rem, 7vw, 6.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--admin-bar-h) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.55 var(--font-body);
  font-synthesis-weight: none;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.15; }
h2 { font-size: var(--fs-h2); line-height: 1.2; }
h3 { font-size: var(--fs-h3); line-height: 1.25; }

.rail { width: var(--rail-w); margin-inline: auto; }
.measure { max-width: var(--measure); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper-3);
  padding: 0.75rem 1rem;
  font-size: var(--fs-sm);
}
.skip-link:focus { left: 0; }

.label {
  margin: 0 0 0.6rem;
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.meta {
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.credits {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 0.85rem;
  line-height: 1.45;
}
.credits span { display: block; }

.link-quiet {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.link-quiet:hover { color: var(--ink); border-bottom-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  background: var(--cta);
  color: var(--paper-3);
  border: 0;
  border-radius: 2px;
  font: 400 var(--fs-body)/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s var(--ease);
}
.btn:hover { background: var(--cta-hover); }
.btn-sm { min-height: 40px; padding: 0.45rem 0.95rem; font-size: var(--fs-sm); }

/* Header — homepage family */
.site-header {
  position: sticky;
  top: var(--admin-bar-h);
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--paper); }
}

.header-row {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 0.5rem 0;
}

.nav {
  display: none;
  margin-inline-start: auto;
  gap: clamp(0.9rem, 1.8vw, 1.7rem);
}
.nav a {
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: none;
  padding: 0.85rem 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav ~ .header-actions { margin-inline-start: 0; }

.nav-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.5rem;
  background: none;
  border: 0;
  color: var(--ink);
  font: 400 var(--fs-sm)/1 var(--font-body);
  cursor: pointer;
}

.header-actions .btn-sm {
  min-height: 44px;
  padding-inline: 0;
  background: none;
  color: var(--ink);
  border-radius: 0;
  border-bottom: 1px solid var(--ink);
  align-self: center;
  font-size: var(--fs-sm);
}
.header-actions .btn-sm:hover { background: none; color: var(--ink); border-bottom-width: 2px; }

.nav-panel {
  position: fixed;
  inset: calc(var(--header-h) + var(--admin-bar-h)) 0 0;
  z-index: 29;
  background: var(--paper);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-panel[hidden] { display: none; }
.nav-panel-inner { width: var(--rail-w); margin-inline: auto; padding: 1.25rem 0 2.5rem; }
.nav-panel nav { display: grid; }
.nav-panel nav a {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-panel-direct { margin-top: 1.5rem; font-size: var(--fs-sm); color: var(--muted); }
.nav-panel-direct a { color: var(--ink); }

/* Masthead */
.masthead {
  padding: clamp(1.5rem, 4vw, 3.25rem) 0 clamp(1.25rem, 3vw, 2.25rem);
}
.masthead-kicker {
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 0.65rem;
}
.masthead-word {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: 0.82;
  letter-spacing: -0.045em;
  margin: 0 0 1.35rem;
  font-weight: 400;
}
.masthead h1 { margin: 0 0 0.7rem; }
.masthead-lede { color: var(--muted); max-width: 32rem; }
.masthead-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 1.5rem;
}
.masthead-index a {
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.masthead-index a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.18em; }

/* Featured cover object */
.cover-object {
  padding: 0 0 var(--sec-y);
}
.cover-object-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: start;
}
.cover-object figure a { display: block; color: inherit; }
.cover-object img {
  width: 100%;
  background: var(--paper-2);
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cover-copy .meta { margin-bottom: 0.85rem; }
.cover-copy h2 { margin: 0.2rem 0 0.85rem; }
.cover-copy p { color: var(--muted); }
.cover-copy .credits { margin-top: 0.85rem; }
.ext-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1.1rem;
  font-size: var(--fs-sm);
}

/* Stories */
.stories { padding: 0 0 var(--sec-y); }
.story {
  padding: clamp(2rem, 5vw, 4.25rem) 0;
  border-top: 1px solid var(--line);
}
.story-head { margin-bottom: 1.35rem; max-width: 42rem; }
.story-head h3 { margin: 0.35rem 0 0.35rem; font-size: var(--fs-h2); }
.seq img,
.detail-seq img,
.pvogue-grid img,
.cover-object img {
  width: 100%;
}
.seq {
  display: grid;
  gap: 0.75rem;
  align-items: start;
}
.seq-ek {
  grid-template-columns: 1fr 1fr;
}
.seq-ek .seq-c { grid-column: 1 / -1; }
.seq-2 { grid-template-columns: 1.15fr 0.85fr; }
.seq-2-even { grid-template-columns: 1fr 1fr; }
.story-open {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1rem;
  font-size: var(--fs-sm);
}

.archive { padding: 0 0 var(--sec-y); }
.archive-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.archive-list li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.archive-list a { text-decoration: none; }
.archive-list a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.archive-list .archive-year,
.archive-list .archive-type { color: var(--muted-2); }
.archive-type {
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-xs);
}

.pvogue {
  padding: var(--sec-y) 0;
  border-top: 1px solid var(--line);
}
.pvogue-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
  align-items: start;
}
.pvogue-copy p { color: var(--muted); margin-top: 0.75rem; max-width: 28rem; }
.pvogue-nums {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.25;
  margin: 1rem 0 1.1rem;
}
.pvogue-nums span { display: block; }

.press, .events { padding: 0 0 var(--sec-y); }
.press-list, .event-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}
.press-list li, .event-list li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  max-width: 44rem;
}
.press-list li:last-child, .event-list li:last-child { border-bottom: 1px solid var(--line); }
.press-source {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 0.3rem;
}
.press-list h3, .event-list h3 { margin: 0 0 0.3rem; }
.press-list p, .event-list p { color: var(--muted); font-size: var(--fs-sm); }
.press-list a, .event-list a { text-decoration: none; }
.press-list a:hover, .event-list a:hover { text-decoration: underline; text-underline-offset: 0.16em; }

.book {
  padding: var(--sec-y) 0;
  background: var(--paper-3);
  border-top: 1px solid var(--line);
}
.book-copy { max-width: 36rem; }
.book-sub { color: var(--muted); margin: 0.7rem 0 0; max-width: 32rem; }

.lead-form { margin-top: clamp(1.25rem, 2.5vw, 2rem); }
.lead-fields { display: grid; gap: 0.9rem; }
.lead-form label { display: grid; gap: 0.35rem; }
.lead-form label > span {
  font-size: var(--fs-xs);
  color: var(--muted-2);
  letter-spacing: 0.02em;
}
.lead-form label > span i { font-style: normal; color: var(--muted-2); }
.lead-form input[type="text"],
.lead-form select {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  appearance: none;
}
.lead-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted-2) 50%),
                    linear-gradient(135deg, var(--muted-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 2.25rem;
}
.form-bait { position: absolute; left: -9999px; }
.form-note { margin-top: 0.85rem; font-size: var(--fs-xs); color: var(--muted); }
.form-status {
  margin-top: 0.85rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.form-status[data-state="err"] { border-color: #c45a3a; }
.lead-form .btn { margin-top: 1.1rem; }

.book-direct { margin-top: 1.6rem; }
.book-direct-lead { font-size: var(--fs-sm); color: var(--muted); }
.book-direct-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}
.book-direct-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.footer-cols {
  display: grid;
  gap: 1.5rem 1.25rem;
}
.site-footer h2 {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-family: var(--font-body);
  margin: 0 0 0.5rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.footer-base { margin-top: 2rem; color: var(--muted); display: grid; gap: 0.6rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }

.brand,
.footer-cols a,
.footer-base a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Detail */
.detail-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1.25rem;
  font-size: var(--fs-sm);
}
.detail-head { padding: 1.5rem 0 2rem; max-width: 40rem; }
.detail-head h1 { margin: 0.35rem 0 0.75rem; }
.detail-seq {
  display: grid;
  gap: clamp(0.65rem, 2vw, 1.35rem);
  padding-bottom: 3rem;
}
.detail-seq figure.portrait { max-width: 36rem; }
.detail-seq figure.landscape { max-width: 52rem; }
.editorials-detail.is-cover .detail-seq figure {
  max-width: 700px;
}
.detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 3.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.detail-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 480px) {
  .lead-fields { grid-template-columns: 1fr 1fr; }
  .lead-wide { grid-column: 1 / -1; }
  .footer-base { grid-template-columns: 1fr auto; align-items: center; }
  .footer-legal { justify-content: flex-end; }
}

@media (min-width: 620px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  :root { --rail-w: min(var(--shell), 100% - 3rem); }
  .cover-object-grid { grid-template-columns: minmax(0, 700px) minmax(16rem, 1fr); }
  .pvogue-grid { grid-template-columns: minmax(16rem, 0.72fr) 1fr 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .nav-panel { display: none !important; }
  .header-actions .btn-sm {
    min-height: 44px;
    padding: 0.45rem 0.95rem;
    background: var(--cta);
    color: var(--paper-3);
    border-radius: 2px;
    border-bottom: 0;
  }
  .header-actions .btn-sm:hover { background: var(--cta-hover); color: var(--paper-3); border-bottom: 0; }
}

@media (min-width: 1120px) {
  .footer-cols { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1600px) {
  :root { --shell: 1480px; }
}

@media (max-width: 899px) {
  .seq-2, .seq-2-even, .seq-ek { grid-template-columns: 1fr; }
  .seq-ek .seq-c { grid-column: auto; }
  .archive-list li { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
