/* Rechtsstaat Wonderland — article styles
   Mobile-first; desktop breakpoint at 740px.
   Fonts: Cormorant Garamond (body serif), Geist (sans display), IBM Plex Mono (metadata)
   Palette: warm cream paper, near-black ink, deep navy accent */

:root {
  --paper:      #f3ede1;
  --paper-2:    #ebe3d3;
  --paper-edge: #e2d8c4;

  --ink:   #15140f;
  --ink-2: #2a2620;
  --ink-3: #524b40;
  --ink-4: #7a7264;
  --ink-5: #a59c8d;
  --rule:  rgba(21, 20, 15, .14);
  --rule-2: rgba(21, 20, 15, .08);

  --accent:      #1f3a5f;
  --accent-soft: rgba(31, 58, 95, .10);

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans:  "Geist", "Inter Tight", -apple-system, system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut:     20px;
  --measure: min(720px, calc(100% - 2 * var(--gut)));
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga", "kern", "onum";
}

body {
  min-height: 100vh;
  background:
    radial-gradient(420px 220px at 50% -80px, rgba(21, 20, 15, .05), transparent 70%),
    var(--paper);
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--paper); }
a { color: inherit; text-decoration: none; }
a.link {
  color: var(--accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 92%;
}

/* ─── Masthead ─────────────────────────────────────────────── */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  border-bottom: .5px solid var(--rule);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px var(--gut);
}

.mast-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 13px;
  color: var(--ink);
}
.mast-logo .mark {
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.mast-nav {
  display: none;
  gap: 24px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
}
.mast-nav a:hover { color: var(--ink); }

.mast-burger {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
}
.mast-burger span {
  width: 16px;
  height: 1px;
  background: var(--ink);
  display: block;
}

/* ─── Layout ────────────────────────────────────────────────── */

.gutter   { padding-left: var(--gut); padding-right: var(--gut); }
.centered { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.full-bleed { margin-left: calc(var(--gut) * -1); margin-right: calc(var(--gut) * -1); }

/* ─── Hero header ───────────────────────────────────────────── */

.hero {
  padding-top: 2.4rem;
  padding-bottom: 1.2rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .bar { width: 20px; height: 1px; background: currentColor; flex-shrink: 0; }

h1.title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin: 0 0 .9rem;
  text-wrap: balance;
  color: var(--ink);
}
h1.title em {
  font-style: italic;
  font-weight: 500;
  color: var(--ink-2);
}

.dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink-2);
  margin: 0 0 1.6rem;
  text-wrap: pretty;
}

/* Byline — two stacked rows on mobile */

.byline {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
}
.byline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.byline-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-5);
  flex-shrink: 0;
}
.byline-meta .author { color: var(--ink); font-weight: 500; }
.byline-meta .tag {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.byline-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.byline-bottom .reading {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.byline-share { display: flex; gap: 6px; }
.byline-share button {
  appearance: none;
  border: .5px solid var(--rule);
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.byline-share button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.share-btn {
  position: relative;
}
.share-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .14s;
}
.share-btn:hover::after { opacity: 1; }

/* ─── Hero image ─────────────────────────────────────────────── */

.hero-figure { margin: 1.6rem 0 .8rem; }
.hero-figure .img {
  width: 100%;
  aspect-ratio: 3 / 2;
  background:
    repeating-linear-gradient(135deg,
      #d8cdb6 0 10px,
      #cdc1a8 10px 20px);
  border-top: .5px solid var(--paper-edge);
  border-bottom: .5px solid var(--paper-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(21, 20, 15, .55);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.hero-figure .img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 20, 15, 0) 60%, rgba(21, 20, 15, .16));
  pointer-events: none;
}
.hero-figure .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-figure .img .placeholder {
  position: relative;
  z-index: 1;
  background: var(--paper);
  padding: 6px 10px;
  border: .5px solid var(--paper-edge);
}

.figcap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px var(--gut) 0;
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-3);
}
.figcap .credit {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ─── Body text ──────────────────────────────────────────────── */

.body { padding-top: .6rem; }

.body p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 1.05em;
  color: var(--ink);
  text-wrap: pretty;
  hyphens: auto;
}
.body p.lede { font-size: 19px; }

.body p > .dropcap {
  float: left;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 4.2em;
  line-height: .86;
  padding: 0.06em 0.1em 0 0;
}

.body h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 1.6rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.body h2::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ink-5);
  flex-shrink: 0;
}

.body h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 1.8rem 0 1.2rem;
  text-wrap: balance;
}
.body h3 .roman {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: .22em;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.body h3 + p::first-line {
  font-variant: small-caps;
  letter-spacing: 0.04em;
}

/* ─── Inline image (mobile: full-bleed, no float) ───────────── */

.inline-fig { margin: 1.6rem 0; }
.inline-fig .img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(135deg,
      #d8cdb6 0 9px,
      #cdc1a8 9px 18px);
  border-top: .5px solid var(--paper-edge);
  border-bottom: .5px solid var(--paper-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(21, 20, 15, .55);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  overflow: hidden;
}
.inline-fig .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.inline-fig .img .placeholder {
  background: var(--paper);
  padding: 5px 9px;
  border: .5px solid var(--paper-edge);
}

/* ─── Blockquote ─────────────────────────────────────────────── */

blockquote.quote {
  margin: 1.8rem 0;
  padding: .2rem 0 .2rem 1.1rem;
  border-left: 1.5px solid var(--accent);
}
blockquote.quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.42;
  color: var(--ink);
  margin: 0 0 .9rem;
  text-wrap: pretty;
}
blockquote.quote p:first-of-type::before {
  content: "\201C";
  color: var(--accent);
  font-size: 1.1em;
  line-height: 0;
  margin-left: -.08em;
}
blockquote.quote p:last-of-type::after {
  content: "\201D";
  color: var(--accent);
  margin-left: .04em;
}
blockquote.quote .attr {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11.5px;
  color: var(--ink-3);
}
blockquote.quote .attr::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--ink-4);
  flex-shrink: 0;
}
blockquote.quote .attr .date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--ink-4);
  text-transform: uppercase;
}

/* ─── Timeline ───────────────────────────────────────────────── */

.timeline { margin: 1.4rem 0 2rem; }

.timeline-h {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 .4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.timeline-h::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ink-5);
  flex-shrink: 0;
}

.timeline-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-3);
  margin: 0 0 1.2rem;
  padding-left: 28px;
}

.timeline dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-top: .5px solid var(--rule);
  padding-top: 1rem;
}

.timeline dl .row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 1.1rem;
  border-bottom: .5px solid var(--rule-2);
  margin-bottom: 1.1rem;
}
.timeline dl .row:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.timeline dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.timeline dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
}

/* ─── Helpers ────────────────────────────────────────────────── */

hr.soft {
  border: 0;
  border-top: .5px solid var(--rule);
  margin: 1.6rem auto;
  max-width: 4rem;
}

.endmark {
  margin-top: 1.6rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.endmark .sq {
  width: 8px;
  height: 8px;
  background: var(--ink);
  flex-shrink: 0;
}

.epilog {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
.epilog .lab {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: .7rem;
}
.epilog p {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 .7em;
}

/* ─── Desktop ≥740px ─────────────────────────────────────────── */

@media (min-width: 740px) {
  :root {
    --gut: 40px;
  }

  .masthead-inner {
    padding: 14px var(--gut);
  }

  .hero,
  .body,
  .centered {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gut);
    padding-right: var(--gut);
  }

  /* On desktop, full-bleed still bleeds to page edge */
  .full-bleed {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

  h1.title {
    font-size: clamp(48px, 6vw, 88px);
    line-height: 1.02;
  }

  .dek {
    font-size: 21px;
    max-width: 42rem;
  }

  .byline {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }
  .byline-meta { flex: 1; }
  .byline-bottom { gap: 20px; }

  .body p {
    font-size: 21px;
    line-height: 1.6;
  }
  .body p.lede { font-size: 22px; }

  .body h3 {
    font-size: 26px;
    margin-top: 2.4rem;
  }

  blockquote.quote {
    margin: 2.4rem 0 2.4rem 1.6rem;
    padding-left: 1.4rem;
  }
  blockquote.quote p { font-size: 23px; }

  /* Two-column timeline on desktop */
  .timeline dl .row {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 0 2rem;
    align-items: baseline;
  }
  .timeline dt {
    font-size: 11px;
    padding-top: .15em;
  }
  .timeline dd { font-size: 19px; }

  /* Desktop inline image can float right */
  .inline-fig.float-right {
    float: right;
    margin: .4rem 0 1.2rem 2rem;
    width: 44%;
  }
  .inline-fig.float-right .img { aspect-ratio: 4 / 3; }
  .body::after { content: ""; display: table; clear: both; }

  .hero-figure .img { aspect-ratio: 16 / 9; }

  .figcap { padding-left: 0; padding-right: 0; }
}

@media (min-width: 1100px) {
  :root { --gut: 60px; }
}

/* ─── Wide desktop ≥1440px: cap hero at 1024px, centered ──── */
@media (min-width: 1440px) {
  .hero-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-figure .img {
    max-width: 1024px;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .hero-figure .figcap {
    max-width: 1024px;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}
