/* Styles for the zagreb.lol/novosti archive. Built on the same civic-ledger aesthetic
   as the pregledi and ulice-i-parcele hubs, laid out as a dated chronicle instead of
   a chooser: one heading per month, one row per entry. */

:root {
  --bg: #f6f1e3;
  --panel: #fffdf7;
  --ink: #1c1a14;
  --ink-muted: #6b6254;
  --line: #e5dcc4;
  --line-strong: #c9bd9c;
  --accent: #00334c;
  --accent-2: #b75a2b;
  --shadow: 0 1px 2px rgba(60, 48, 20, 0.05), 0 2px 6px rgba(60, 48, 20, 0.04);
  --serif: "Fraunces", "Iowan Old Style", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Menlo", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.36  0 0 0 0 0.22  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

body > * { position: relative; z-index: 1; }

.hero {
  padding: 1.6rem 1rem 1.2rem;
  margin: 0 auto;
  max-width: 760px;
  border-top: 3px double var(--line-strong);
  border-bottom: 3px double var(--line-strong);
  text-align: center;
}

.hero .overline {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .overline a {
  color: var(--ink-muted);
  text-decoration: none;
}

.hero .overline a:hover {
  color: var(--accent-2);
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.3rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144;
}

.hero .subtitle {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1rem;
  font-style: italic;
  font-family: var(--serif);
  font-variation-settings: "opsz" 14;
}

.hero .subtitle::before,
.hero .subtitle::after {
  content: "❦";
  margin: 0 0.5rem;
  color: var(--accent-2);
  font-style: normal;
  opacity: 0.85;
}

.hero .meta {
  margin: 0.7rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero .meta a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.hero .meta a:hover { color: var(--accent-2); }

/* Reserve the chronicle's space so the footer does not ride up while it loads. */
main {
  max-width: 760px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 1.5rem 1rem 0.5rem;
}

.novost-month {
  margin: 0 0 1.6rem;
}

.novost-month h2 {
  margin: 0 0 0.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px double var(--line-strong);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--accent-2);
  font-variation-settings: "opsz" 24;
}

.novost-item {
  display: block;
  padding: 0.85rem 0.9rem 0.8rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 150ms ease;
}

.novost-item:hover {
  background: var(--panel);
}

.novost-item-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}

.novost-day {
  flex: 0 0 2.1em;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.novost-kind {
  /* One width for every kind, so the titles start on a single line down the page.
     8.2em clears the widest word (osvježeno) at this font size. */
  flex: 0 0 auto;
  min-width: 8.2em;
  text-align: center;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.novost-kind-novo {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.novost-kind-clanak {
  color: var(--accent);
  border-color: var(--accent);
}

.novost-item-title {
  flex: 1 1 12rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.25;
  font-variation-settings: "opsz" 48;
}

.novost-item:hover .novost-item-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.novost-item-text {
  margin: 0.3rem 0 0 2.7em;
  color: var(--ink-muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.novost-error {
  margin: 2rem 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-muted);
}

footer {
  padding: 1.25rem 1rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--serif);
  font-variation-settings: "opsz" 14;
}

footer a { color: inherit; }

footer::before {
  content: "❦";
  display: block;
  color: var(--accent-2);
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
  font-style: normal;
  opacity: 0.85;
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .novost-item { padding: 0.8rem 0.4rem 0.75rem; }
  .novost-item-title { font-size: 1.02rem; }
  .novost-item-text { margin-left: 0; }
}
