/* Warszawa w Sercu — Dark Editorial System */
:root {
  --bg: #0a0a0c;
  --surface: #0f0f14;
  --surface-elevated: #13131a;
  --text: #f0ede8;
  --text-muted: #8a857a;
  --text-dim: #aaa39a;
  --accent: #d28a8a;
  --accent-strong: #8f2525;
  --accent-muted: #7a2020;
  --line: #1a1816;
  --dark: #050508;
}

[data-theme="light"] {
  --bg: #f0ede8;
  --surface: #faf9f6;
  --surface-elevated: #ffffff;
  --text: #11110f;
  --text-muted: #6e6658;
  --text-dim: #70695f;
  --accent: #8f2525;
  --accent-strong: #8f2525;
  --accent-muted: #7a2020;
  --line: #ddd8cf;
  --dark: #050508;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--text);
}

h1 { font-size: clamp(2.6rem, 6.5vw, 4.8rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.8rem); margin-top: 4rem; }
h3 { font-size: clamp(1.2rem, 2.8vw, 1.55rem); margin-top: 2.8rem; }

p {
  margin: 0 0 1.35rem;
  max-width: 72ch;
}

.lead {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.45;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

a { color: var(--accent); text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link {
  position: absolute; z-index: 200; top: 0.5rem; left: 0.5rem;
  transform: translateY(-160%); padding: 0.75rem 1rem;
  color: #fff; background: var(--accent-strong);
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: 1240px; margin: 0 auto; padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
}
.site-brand {
  flex: 0 0 auto; font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300; font-size: 1.85rem; letter-spacing: 0.03em;
  color: var(--text); text-decoration: none; line-height: 1;
}
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a {
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--text-muted);
}
.site-nav a:hover { color: var(--text); }
.theme-toggle {
  flex: 0 0 auto; background: transparent; border: 1px solid var(--line);
  border-radius: 50%; width: 2.4rem; height: 2.4rem; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer;
  color: var(--text); line-height: 1;
}
.theme-toggle:hover { background: var(--surface-elevated); }
main:focus { outline: none; }

.section-label {
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; font-weight: 500;
}

.hero-placeholder {
  background: linear-gradient(135deg, #0f0f14 0%, #16161c 60%, #0a0a0c 100%);
  border: 1px solid var(--line);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.hero-placeholder img,
.hero-placeholder .placeholder-text {
  display: flex; align-items: center; justify-content: center; color: var(--text-muted); text-align: center; padding: 4rem 2rem;
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.25rem; font-style: italic; letter-spacing: 0.02em;
}

[data-theme="light"] .hero-placeholder {
  background: linear-gradient(135deg, #eae7df 0%, #ddd8cf 60%, #f4f2ee 100%);
}

[data-theme="light"] .hero-placeholder .placeholder-text {
  color: #6e6658;
}

.caption-box {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.source-ui {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.pull-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  line-height: 1.35;
  font-weight: 300;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 3rem 0;
}

.editorial-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
  font-size: 0.9rem;
}

.editorial-note strong {
  display: block; margin-bottom: 0.5rem; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 500;
}

.source-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.source-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.source-list a { color: var(--text); text-decoration: underline; text-underline-offset: 0.15em; text-decoration-color: rgba(163,42,42,0.3); }
.source-list a:hover { text-decoration-color: rgba(163,42,42,0.9); }

.media-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.media-meta strong {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
  font-weight: 500;
}

.story-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 3rem; color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.02em; }
.story-hero { aspect-ratio: 16 / 9; margin-bottom: 1rem; }
.story-hero figcaption, .additional-media figcaption { padding: 0.75rem 1rem; color: var(--text-muted); border-top: 1px solid var(--line); font-size: 0.8rem; }
.story-body blockquote {
  border-left: 3px solid var(--accent); margin: 3rem 0; padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--text); font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.35rem, 3.5vw, 2rem); line-height: 1.35;
}
.story-body ul { color: var(--text-muted); line-height: 1.7; }
.editorial-note ul { margin: 0.5rem 0 0 1.25rem; padding-left: 0.5rem; line-height: 1.6; }
.fact-card { background: var(--surface-elevated); border: 1px solid var(--line); padding: 1.5rem 2rem; margin: 2.5rem 0; }
.fact-card h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.fact-card p { margin: 0.25rem 0; color: var(--text-muted); }
.fact-card .fact-number { color: var(--text); font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.fact-card .fact-source { margin-top: 0.75rem; color: var(--text-dim); font-size: 0.8rem; }
.additional-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; }

@media (max-width: 640px) {
  .site-header-inner { flex-wrap: wrap; padding: 0.9rem 1rem; gap: 0.9rem; }
  .site-brand { font-size: 1.55rem; }
  .site-nav { order: 3; width: 100%; flex-wrap: wrap; gap: 0.8rem 1rem; }
  .site-nav a { font-size: 0.72rem; }
  .theme-toggle { margin-left: auto; }
  .story { padding-top: 3.5rem !important; }
  .story-meta { gap: 0.5rem 1rem; }
  .fact-card { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Approved archival illustrations (WWS #011G) */
.hero-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
}
.hero-media--16x9 { aspect-ratio: 16 / 9; }
.hero-media--16x10 { aspect-ratio: 16 / 10; }
.hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.story-body figure { margin: 2.75rem 0; }
.story-body figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--surface); }
.story-body figure.lead-image { margin-top: 0; }
.story-body figure.portrait { max-width: 30rem; margin-left: auto; margin-right: auto; }
.story-body figcaption { margin-top: 0.8rem; padding-left: 0.9rem; border-left: 2px solid var(--accent-muted); font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.story-body figcaption .caption { display: block; }
.story-body figcaption .credit { display: block; margin-top: 0.35rem; font-size: 0.78rem; color: var(--text-dim); }

.story-body .footnotes { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--text-muted); }
.story-body .footnotes ol { padding-left: 1.25rem; }
.story-body .footnotes li { margin-bottom: 0.9rem; line-height: 1.6; }
.story-body .footnotes li p { margin-bottom: 0.4rem; }

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