/* ─────────────────────────────────────────────────────────────────
   ZdravaFakta — shared public-site base
   Tokens, body chrome (paper grain + ambient glow), scroll bar,
   logo, footer. Loads AFTER theme.css/menu.css so its tokens are the
   light-mode defaults; theme.css flips them for [data-theme="dark"].
   ───────────────────────────────────────────────────────────────── */

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* TOKENS — light-mode defaults (dark flips in theme.css) */
:root {
  --bg: #FAFAF7;
  --bg-elev: #FFFFFF;
  --bg-elev-2: #F2EFE6;
  --fg: #2C2C2C;
  --fg-soft: #5C5C5C;
  --fg-muted: #8E8E8E;

  --brand-blue: #1B3A6B;
  --brand-blue-soft: #E3EAF3;
  --brand-blue-deep: #122849;
  --brand-gold: #F5C842;
  --brand-gold-soft: #FCEFC2;
  --gold-deep: #D4A82B;
  --villain: #C0392B;
  --villain-soft: #F5DDD9;

  --line: rgba(44, 44, 44, 0.08);
  --line-strong: rgba(44, 44, 44, 0.14);

  --font-display: 'Baloo 2', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --side-pad: clamp(20px, 5vw, 64px);
  --max-w: 1280px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-snap-type: y proximity;
}

body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-weight: 400;
  position: relative;
}

::selection { background: var(--brand-gold); color: var(--brand-blue); }

/* paper grain — warm and subtle */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* gentle ambient gold glow */
body::after {
  content: "";
  position: fixed;
  width: 80vmax;
  height: 80vmax;
  top: -20vmax;
  left: -20vmax;
  background: radial-gradient(circle at 50% 50%, rgba(245, 200, 66, 0.10) 0%, rgba(245, 200, 66, 0) 50%);
  pointer-events: none;
  z-index: -2;
  animation: drift 30s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(20vw, 15vh); }
}

/* TYPOGRAPHY UTILITIES */
.t-display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.t-mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.t-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* LAYOUT */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

/* SECTION NUMBER LABEL */
.sec-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.sec-num::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-blue), transparent);
}

/* BADGE pills (verified / myth) — used on cards and article meta */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  font-weight: 600;
}
.badge.verified {
  color: var(--brand-blue);
  background: var(--brand-gold-soft);
  border: 1px solid var(--brand-gold);
}
.badge.myth {
  color: var(--villain);
  background: var(--villain-soft);
  border: 1px solid rgba(192, 57, 43, 0.28);
}

/* SCROLL PROGRESS BAR */
.scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-blue), var(--gold-deep), var(--brand-gold));
  z-index: 999;
  transition: width 0.05s linear;
}

/* LOGO */
.logo {
  position: fixed;
  top: 20px;
  left: clamp(20px, 5vw, 64px);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  height: 40px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.3s;
}

.logo span { color: var(--brand-blue); }

/* FOOTER */
.footer {
  padding: 48px var(--side-pad) 40px;
  border-top: 1px solid var(--line);
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.footer-logo span { color: var(--brand-blue); }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--brand-blue); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
