/* ==========================================================================
   XBT — SEO/GEO content layer
   Shared stylesheet for the static pages under /vodic/ , /orodja/ , and the
   entity pages. Self-contained, zero dependencies. Matches the live xbt.si
   brand: pure-black canvas, blue-glass panels, Inter + Instrument Serif +
   Space Grotesk. Built for fast LCP (no render-blocking JS) and clean,
   crawlable, citable HTML.
   ========================================================================== */

:root {
  --bg:        #030303;
  --bg-1:      #0a0a0b;
  --bg-2:      #111114;
  --bg-3:      #16161a;
  --fg:        #ffffff;
  --fg-soft:   #c8c8d0;
  --muted:     #9a9aa3;
  --dim:       #6a6a72;
  --line:      rgba(255, 255, 255, 0.10);
  --line-2:    rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.06);
  --accent:    #5b8dff;
  --accent-2:  #7aa2ff;
  --accent-dim:rgba(91, 141, 255, 0.14);
  --accent-line:rgba(91, 141, 255, 0.38);
  --good:      #4ade80;
  --warn:      #facc15;
  --bad:       #fb923c;

  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans:  "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "Space Grotesk", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --maxw: 1120px;
  --readw: 720px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient blue glow blobs (decorative, behind content) */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  pointer-events: none;
}
body::before { top: -18vw; right: -12vw; background: radial-gradient(circle, rgba(91,141,255,0.22), transparent 65%); }
body::after  { bottom: -22vw; left: -14vw; background: radial-gradient(circle, rgba(60,90,220,0.16), transparent 65%); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----- Layout ----------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.read { max-width: var(--readw); margin-inline: auto; }
.section { padding-block: clamp(40px, 7vw, 84px); }

/* ----- Header / nav ----------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(3, 3, 3, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  height: 62px; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter);
}
.nav .logo { display: flex; align-items: center; gap: 9px; margin-right: auto; }
.nav .logo img { height: 19px; width: auto; }
.nav .logo b { font-weight: 700; letter-spacing: 0.02em; font-size: 15px; }
.nav a.navlink {
  color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
}
.nav a.navlink:hover { color: var(--fg); text-decoration: none; }
.nav .nav-links { display: flex; gap: 22px; align-items: center; }
.nav-cta {
  font-size: 13.5px; font-weight: 600; color: var(--fg);
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--accent-line); background: var(--accent-dim);
}
.nav-cta:hover { background: rgba(91,141,255,0.22); text-decoration: none; }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav .nav-links { display: none; }
  .nav .nav-links.open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 62px; left: 0; right: 0;
    background: rgba(8,8,10,0.97); border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 18px;
  }
  .nav .nav-links.open a.navlink { padding: 8px 0; font-size: 15px; }
  .nav-toggle {
    display: inline-flex; background: none; border: 1px solid var(--line-2);
    color: var(--fg); border-radius: 8px; width: 38px; height: 34px;
    align-items: center; justify-content: center; cursor: pointer; font-size: 17px;
  }
}

/* ----- Eyebrow / kicker labels ------------------------------------------ */
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 14px;
}
.eyebrow.dim { color: var(--dim); }

/* ----- Typography ------------------------------------------------------- */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 0.5em; }
h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.02; letter-spacing: -0.032em; }
h2 { font-size: clamp(25px, 3.4vw, 36px); margin-top: 1.6em; }
h3 { font-size: clamp(19px, 2.2vw, 23px); margin-top: 1.5em; letter-spacing: -0.02em; }
h1 em, h2 em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0 0 1.15em; color: var(--fg-soft); }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--fg); line-height: 1.55; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
strong, b { color: var(--fg); font-weight: 600; }
.read h2, .read h3 { scroll-margin-top: 80px; }
.read ul, .read ol { color: var(--fg-soft); padding-left: 1.25em; margin: 0 0 1.15em; }
.read li { margin-bottom: 0.5em; }
.read li::marker { color: var(--accent); }
hr { border: none; border-top: 1px solid var(--line); margin: 2.5em 0; }

/* ----- Hero ------------------------------------------------------------- */
.hero { padding-top: clamp(40px, 7vw, 80px); padding-bottom: clamp(20px, 3vw, 40px); }
.hero h1 { margin-bottom: 0.4em; }
.hero .lead { max-width: 680px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: 13.5px; color: var(--dim); font-family: var(--mono); letter-spacing: 0.01em; }
.hero-meta b { color: var(--muted); font-weight: 500; }

/* ----- Breadcrumb ------------------------------------------------------- */
.crumbs { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--dim); margin-bottom: 22px; }
.crumbs a { color: var(--muted); }
.crumbs span { color: var(--dim); margin: 0 7px; }

/* ----- TL;DR / answer box ----------------------------------------------- */
.tldr {
  border: 1px solid var(--accent-line);
  background: linear-gradient(160deg, rgba(91,141,255,0.13), rgba(91,141,255,0.04));
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 28px 0 8px;
}
.tldr .eyebrow { color: var(--accent-2); margin-bottom: 9px; }
.tldr p { margin: 0; color: var(--fg); font-size: 17.5px; line-height: 1.6; }
.tldr p + p { margin-top: 0.7em; }

/* ----- Cards / glass ---------------------------------------------------- */
.card {
  background: linear-gradient(155deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

/* numbered editorial step */
.step .num { font-family: var(--mono); font-size: 12px; color: var(--accent-2); letter-spacing: 0.1em; }

/* ----- Stat strip ------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats .stat { background: var(--bg-1); padding: 20px 16px; text-align: center; }
.stats .v { font-size: clamp(24px, 3.4vw, 34px); font-weight: 600; letter-spacing: -0.03em; color: var(--fg); }
.stats .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; letter-spacing: -0.005em; }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ----- Tables ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 22px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 540px; }
caption { text-align: left; color: var(--dim); font-size: 13px; padding: 10px 16px; font-family: var(--mono); letter-spacing: 0.02em; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-2); color: var(--fg); font-weight: 600; font-size: 13px; letter-spacing: 0.01em; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
td .yes { color: var(--good); } td .no { color: var(--dim); }

/* ----- FAQ -------------------------------------------------------------- */
.faq { margin: 18px 0; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 18px; margin-bottom: 10px; background: var(--bg-1);
}
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 28px 16px 0; position: relative;
  font-weight: 600; font-size: 16.5px; color: var(--fg); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 14px;
  color: var(--accent-2); font-size: 22px; font-weight: 400; line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { border-bottom: 1px solid var(--line-soft); }
.faq .answer { padding: 14px 0 18px; color: var(--fg-soft); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ----- Callout / note --------------------------------------------------- */
.note { border-left: 2px solid var(--accent); background: rgba(91,141,255,0.06); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 22px 0; }
.note p:last-child { margin-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2); border: 1px solid var(--accent-line); background: var(--accent-dim); border-radius: 999px; padding: 4px 11px; }

/* ----- Buttons / CTA ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  padding: 13px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--fg);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: var(--fg); transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #04122e; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.cta-band {
  border: 1px solid var(--accent-line);
  background: linear-gradient(160deg, rgba(91,141,255,0.16), rgba(91,141,255,0.03));
  border-radius: var(--radius); padding: clamp(26px, 4vw, 40px);
  margin: 36px 0; text-align: center;
}
.cta-band h2 { margin-top: 0; }
.cta-band .cta-row { justify-content: center; }

/* ----- Author / meta byline --------------------------------------------- */
.byline { display: flex; align-items: center; gap: 12px; margin: 26px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.byline .who b { color: var(--fg); font-weight: 600; }
.byline time { color: var(--dim); }

/* ----- Table of contents ------------------------------------------------ */
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 26px 0; background: var(--bg-1); }
.toc .eyebrow { margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 1.1em; }
.toc li { margin-bottom: 6px; color: var(--muted); }
.toc a { color: var(--fg-soft); }

/* ----- Related links cards ---------------------------------------------- */
.related a { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); transition: border-color 0.18s ease, background 0.18s ease; }
.related a:hover { border-color: var(--accent-line); background: rgba(91,141,255,0.05); text-decoration: none; }
.related .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2); }
.related .t { font-weight: 600; margin-top: 6px; letter-spacing: -0.015em; }
.related .d { color: var(--muted); font-size: 14px; margin-top: 5px; }

/* ----- Footer ----------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding-block: 40px; color: var(--muted); font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer a { color: var(--muted); display: block; margin-bottom: 8px; }
.site-footer a:hover { color: var(--fg); }
.site-footer .ft-head { color: var(--fg); font-weight: 600; margin-bottom: 12px; font-size: 13px; letter-spacing: 0.02em; }
.site-footer .legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: space-between; color: var(--dim); font-size: 13px; }
@media (max-width: 680px) { .site-footer .cols { grid-template-columns: 1fr; gap: 22px; } }

/* ----- Tools: forms, sliders, results ----------------------------------- */
.tool { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-1); padding: clamp(20px, 3vw, 30px); margin: 26px 0; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; color: var(--fg); }
.field .hint { color: var(--dim); font-size: 13px; font-weight: 400; }
input[type="number"], input[type="email"], input[type="text"], select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--fg);
  font-family: var(--sans); font-size: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-val { font-family: var(--mono); color: var(--accent-2); font-weight: 500; }

/* quiz options */
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px 16px;
  background: var(--bg-2); transition: border-color 0.15s ease, background 0.15s ease;
}
.opt:hover { border-color: var(--accent-line); }
.opt.sel { border-color: var(--accent); background: rgba(91,141,255,0.10); }
.opt input { margin-top: 3px; accent-color: var(--accent); }
.opt .ot { font-weight: 600; font-size: 15px; }
.opt .od { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.q-step { display: none; }
.q-step.active { display: block; animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.progress { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 24px; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.3s ease; }

.result { display: none; }
.result.show { display: block; animation: fade 0.4s ease; }
.result .big { font-size: clamp(44px, 9vw, 80px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-family: var(--serif); font-style: italic; color: var(--accent-2); }
.gauge { height: 10px; background: var(--bg-3); border-radius: 999px; overflow: hidden; margin: 16px 0; border: 1px solid var(--line); }
.gauge > i { display: block; height: 100%; background: linear-gradient(90deg, var(--bad), var(--warn), var(--good)); width: 0; transition: width 0.8s ease; }

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

/* utilities */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
