/* NOIR — editorial fashion-magazine treatment for spandexgirls.net.
   Near-black ground, warm bone ink, single antique-brass foil accent.
   Serif display (Georgia) set large & tight, tracked sans for labels. */

:root {
  --bg: #0c0c0b;
  --surface: #161512;
  --surface-2: #1e1c17;
  --ink: #f3f0e6;
  --muted: #948f80;
  --line: rgba(243, 240, 230, .12);
  --accent: #c3924a;
  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { font: inherit; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

/* ---- topbar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--font-display); font-style: italic; font-size: 26px;
  letter-spacing: -.01em; text-decoration: none;
}
.wordmark b { font-style: normal; font-weight: 400; color: var(--accent); }
.topnav { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.topnav a, .topnav button {
  text-decoration: none; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); transition: color .15s; background: none; border: none; padding: 0; cursor: pointer;
}
.topnav a:hover, .topnav a.current, .topnav button:hover, .topnav button.current { color: var(--ink); }
.topnav select {
  text-decoration: none; font-family: var(--font-body); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); background: none; border: none; padding: 0; cursor: pointer; appearance: none;
  -webkit-appearance: none; -moz-appearance: none;
}
.topnav select:hover, .topnav select.current { color: var(--ink); }
.topnav select option { background: var(--surface); color: var(--ink); text-transform: none; letter-spacing: normal; }
@media (max-width: 640px) { .topnav { display: none; } }

/* ---- hero spread ---- */
.hero { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 32px; } }

.hero-frame { position: relative; overflow: hidden; display: block; text-decoration: none; color: inherit; }
.hero-frame .thumb { aspect-ratio: 4/5; }
.hero-cap { margin-top: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.hero-cap h1 { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 34px; margin: 0; text-wrap: balance; }
.hero-cap .tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }

.hero-side { display: flex; flex-direction: column; justify-content: space-between; }
.hero-kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.hero-pull { font-family: var(--font-display); font-style: italic; font-size: 22px; line-height: 1.4; color: var(--ink); margin: 0 0 28px; text-wrap: balance; }
.hero-pull span { color: var(--accent); }

.toc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.toc li { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.toc .n { color: var(--muted); font-variant-numeric: tabular-nums; width: 26px; flex: none; }
.toc .t { flex: 1; }
.toc a { text-decoration: none; }
.toc a:hover .t { color: var(--accent); }
.toc .d { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---- section head ---- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 44px 0 26px; gap: 20px; flex-wrap: wrap; }
.section-head .issue { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--muted); }
.section-head h2 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin: 0; color: var(--ink); }
.section-head .count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- contact sheet grid ---- */
.sheet { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px 24px; }
.frame { display: block; text-decoration: none; color: inherit; }
.frame.span-5 { grid-column: span 5; }
.frame.span-4 { grid-column: span 4; }
.frame.span-3 { grid-column: span 3; }
.frame.span-8 { grid-column: span 8; }
@media (max-width: 860px) {
  .sheet { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; }
  .frame.span-5, .frame.span-4, .frame.span-3, .frame.span-8 { grid-column: span 1; }
}

.thumb {
  position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--surface);
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: filter .35s ease, transform .5s ease;
}
.frame:hover .thumb img { transform: scale(1.015); }

/* the hero frame stays desaturated until hovered — every other frame runs in colour */
.hero-frame .thumb img { filter: grayscale(1) contrast(1.08) brightness(.98); }
.hero-frame:hover .thumb img { filter: grayscale(0) contrast(1.02) saturate(.9) brightness(1); transform: scale(1.015); }
.thumb .idx {
  position: absolute; left: 10px; bottom: 10px; font-size: 11px; letter-spacing: .08em;
  color: rgba(255,255,255,.85); font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0,0,0,.6);
  pointer-events: none;
}

.frame-cap { margin-top: 12px; }
.frame-cap h3 { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 17px; margin: 0 0 4px; text-wrap: balance; }
.frame-meta { display: flex; gap: 10px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.frame-meta .m-accent { color: var(--accent); }

/* ---- footer ---- */
footer.masthead { border-top: 1px solid var(--line); padding: 30px 0 60px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer.masthead p { margin: 0; font-size: 12px; color: var(--muted); }
.more-link {
  display: inline-block; margin: 6px 0 50px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; border: 1px solid var(--line); padding: 12px 22px; background: none; cursor: pointer;
}
.more-link:hover { color: var(--ink); border-color: var(--accent); }

/* ---- state (loading / empty) ---- */
.state-line { padding: 40px 0; color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }

/* ---- detail page ---- */
.crumb { padding: 20px 0 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.crumb a, .crumb button { text-decoration: none; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.crumb a:hover, .crumb button:hover { color: var(--accent); }

.detail-hero { position: relative; margin-top: 22px; overflow: hidden; display: block; text-decoration: none; color: inherit; cursor: zoom-in; }
.detail-hero .thumb { aspect-ratio: 16/8; }
.detail-hero .thumb img { filter: grayscale(1) contrast(1.1) brightness(.85); }
.detail-hero:hover .thumb img { filter: grayscale(0) contrast(1.02) saturate(.9) brightness(1); }
@media (max-width: 720px) { .detail-hero .thumb { aspect-ratio: 3/4; } }
.detail-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 40px; background: linear-gradient(0deg, rgba(0,0,0,.72) 0%, transparent 55%); pointer-events: none;
}
.detail-title { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 56px; margin: 0 0 10px; color: #fff; text-wrap: balance; }
@media (max-width: 720px) { .detail-title { font-size: 34px; } }
.detail-meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.detail-meta .m-accent { color: var(--accent); }

.detail-body { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; padding: 44px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .detail-body { grid-template-columns: 1fr; gap: 24px; } }
.detail-note { font-family: var(--font-display); font-style: italic; font-size: 21px; line-height: 1.55; color: var(--ink); margin: 0; text-wrap: balance; }
.detail-facts { list-style: none; margin: 0; padding: 0; }
.detail-facts li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-facts .k { color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.detail-facts .v { font-variant-numeric: tabular-nums; text-align: right; }
.detail-facts .v a { color: var(--accent); text-decoration: none; }
.detail-facts .v a:hover { text-decoration: underline; }

.related { padding: 8px 0 60px; }
.related-head { padding-top: 26px; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 720px) { .related-list { grid-template-columns: 1fr; } }

/* ---- lightbox ---- */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 999; background: rgba(6,6,5,.94);
}
.lightbox.open { display: block; }

.lightbox-stage {
  position: relative; width: 100%; height: 100%; overflow: auto;
  display: flex; align-items: flex-start; justify-content: center;
}
.lightbox-stage img {
  height: 100vh; width: auto; display: block; cursor: zoom-in; user-select: none;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.lightbox-close {
  position: absolute; top: 24px; right: 32px; z-index: 2; background: none; border: none; color: var(--muted);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
}
.lightbox-close:hover { color: var(--ink); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: none; border: none;
  color: var(--muted); font-family: var(--font-display); font-size: 34px; cursor: pointer; padding: 10px 16px;
}
.lightbox-nav:hover { color: var(--accent); }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-idx {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: 11px; letter-spacing: .1em; color: var(--muted); font-variant-numeric: tabular-nums;
}
.lightbox-zoom {
  position: absolute; bottom: 24px; right: 32px; z-index: 2;
  font-size: 11px; letter-spacing: .1em; color: var(--muted); font-variant-numeric: tabular-nums;
}

.loupe {
  display: none; position: fixed; z-index: 1001; width: 380px; height: 380px; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 8px 30px rgba(0,0,0,.65), inset 0 0 0 1px rgba(255,255,255,.15);
  pointer-events: none; background-repeat: no-repeat; background-color: #060605;
}
@media (max-width: 800px) { .loupe { display: none !important; } }
