/* fraunces · latin-ext · italic */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/fraunces-latin-ext-300-italic.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* fraunces · latin · italic */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/fraunces-latin-300-italic.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* fraunces · latin-ext · normal */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/fraunces-latin-ext-300.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* fraunces · latin · normal */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/assets/fonts/fraunces-latin-300.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* plex-sans · latin-ext · normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/plex-sans-latin-ext-300.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* plex-sans · latin · normal */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/plex-sans-latin-300.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* plex-mono · latin-ext · normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-ext-400.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* plex-mono · latin · normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-400.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* plex-mono · latin-ext · normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-ext-500.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* plex-mono · latin · normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-500.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* plex-mono · latin-ext · normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-ext-600.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* plex-mono · latin · normal */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-latin-600.woff2?v=baeb2694) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Neo — stil. Ručno pisan CSS, bez frameworka.
   Jezik: tamno platno, cijan akcent, grotesk u velikom stupnju,
   monospace za metapodatke. Slova: Fraunces, IBM Plex Sans/Mono
   (lokalno, sa ovog servera).
   ============================================================ */

:root {
  --bg: #0e0f12;
  --bg2: #131519;
  --tile: #171a21;
  --tile2: #1c1f28;
  --fg: #f2f4f7;
  --fg2: rgba(242, 244, 247, .72);
  --muted: #838998;
  --line: #24262b;
  --line2: #32353c;
  --brand: #66d9ed;
  --brand-ink: #07222a;
  --warm: #d9a45c;
  --glow1: rgba(102, 217, 237, .16);
  --glow2: rgba(226, 138, 72, .18);
  --fd: "Fraunces", "Iowan Old Style", Georgia, serif;
  --fs: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fm: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1220px;
  --r: 3px;
}

[data-theme="light"] {
  --bg: #f4f1ea;
  --bg2: #ece7db;
  --tile: #eae4d7;
  --tile2: #e2dbcc;
  --fg: #171a1f;
  --fg2: rgba(23, 26, 31, .74);
  --muted: #5b5f66;
  --line: #ddd7c9;
  --line2: #c7c0b0;
  --brand: #0d6f84;
  --brand-ink: #ffffff;
  --warm: #a8431f;
  --glow1: rgba(13, 111, 132, .10);
  --glow2: rgba(168, 67, 31, .10);
}

*, *::before, *::after { 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(--fs);
  font-size: clamp(.98rem, .94rem + .2vw, 1.06rem);
  line-height: 1.6;
  font-weight: 300;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Svetlosna mrlja u pozadini — dvije radijalne, bez slika */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto -10vw;
  height: 90vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 60% at 22% 18%, var(--glow1), transparent 70%),
    radial-gradient(42% 56% at 82% 32%, var(--glow2), transparent 72%);
  filter: blur(6px);
}

/* Zrno — diskretno */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.045'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 5vw, 2.6rem); position: relative; z-index: 2; }
.wrap-narrow { max-width: 880px; }

/* sidra ne smiju završiti pod fiksnom trakom */
[id] { scroll-margin-top: 86px; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

.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; }

.skip {
  position: absolute; top: 0; z-index: 60; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  background: var(--brand); color: var(--brand-ink);
  padding: .7rem 1.1rem; font-family: var(--fm); font-size: .82rem;
}
.skip:focus {
  width: auto; height: auto; margin: 0; overflow: visible; clip-path: none;
  inset-inline-start: 1rem; top: 1rem;
}

.mono { font-family: var(--fm); font-size: .8rem; letter-spacing: .02em; }
.muted { color: var(--muted); }

/* Označena riječ u naslovu — pun blok, kao flomaster */
.hl { background: var(--brand); color: var(--brand-ink); padding: 0 .1em; border-radius: 1px; font-weight: 500; }
.hl-warm { background: var(--warm); color: var(--brand-ink); }

/* ---------- traka gore ---------- */
.tb {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s;
  border-bottom: 1px solid transparent;
}
.tb.on {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom-color: var(--line);
}
.tb-in { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 2rem); height: 66px; }

.mark { display: flex; align-items: center; gap: .6rem; font-family: var(--fm); font-size: .95rem; letter-spacing: .04em; }
.mark-v {
  display: grid; place-items: center;
  width: 30px; height: 30px; border: 1px solid var(--brand);
  color: var(--brand); border-radius: var(--r);
  font-family: var(--fd); font-weight: 700; font-size: 1.05rem; line-height: 1;
  transition: background .2s ease, color .2s ease;
}
.mark:hover .mark-v { background: var(--brand); color: var(--brand-ink); }
.mark-t { color: var(--fg2); }
.mark-c { color: var(--brand); animation: blink 1.15s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.tb-nav { display: flex; align-items: center; gap: clamp(.7rem, 1.8vw, 1.6rem); margin-inline: auto; }
.tb-a { display: grid; gap: .1rem; line-height: 1.1; }
.tb-num { font-family: var(--fm); font-size: .63rem; color: var(--muted); letter-spacing: .1em; }
.tb-txt { font-size: .93rem; font-weight: 400; color: var(--fg2); transition: color .2s; }
.tb-txt::before { content: "// "; color: var(--brand); font-family: var(--fm); font-size: .85em; }
.tb-a:hover .tb-txt, .tb-a[aria-current="true"] .tb-txt { color: var(--fg); }
.tb-r { display: flex; align-items: center; gap: .5rem; }

.ib {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: transparent; color: var(--fg2); cursor: pointer;
  font-family: var(--fm); font-size: .72rem; letter-spacing: .04em;
  transition: border-color .2s, color .2s, background .2s;
}
.ib:hover { border-color: var(--brand); color: var(--brand); }
.ib svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 120px 0 60px; position: relative;
}
.hero-name {
  margin: 0;
  font-family: var(--fs); font-weight: 600;
  font-size: clamp(3.2rem, 13.5vw, 11rem);
  line-height: .92; letter-spacing: -.035em; text-transform: uppercase;
}
.hero-sub {
  margin: clamp(1rem, 2.4vw, 1.6rem) 0 0;
  font-family: var(--fm); font-size: clamp(.68rem, 1.5vw, .82rem);
  letter-spacing: .3em; text-transform: uppercase; color: var(--fg2);
}
.hero-lede {
  margin: clamp(1.2rem, 3vw, 1.9rem) auto 0; max-width: 62ch;
  color: var(--fg2); font-size: clamp(1rem, 1.1vw, 1.12rem);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: clamp(1.6rem, 3.4vw, 2.4rem); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.35rem; border: 1px solid var(--line2); border-radius: var(--r);
  font-family: var(--fm); font-size: .82rem; letter-spacing: .04em;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 500; }
.btn-brand:hover { background: transparent; color: var(--brand); }

.cue {
  margin-top: clamp(2.4rem, 6vw, 4rem);
  font-family: var(--fm); font-size: .68rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted);
  display: grid; gap: .5rem; justify-items: center;
}
.cue-l { width: 1px; height: 46px; background: linear-gradient(var(--line2), transparent); }

/* ---------- traka "u pogonu" ---------- */
.strip { border-block: 1px solid var(--line); padding: 1.1rem 0; }
.strip-lbl {
  font-family: var(--fm); font-size: .68rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: .9rem;
}
.marq { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marq-t { display: flex; width: max-content; animation: slide 38s linear infinite; }
.marq:hover .marq-t { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.marq-g { display: flex; align-items: center; }
.marq-i {
  font-family: var(--fm); font-size: .9rem; color: var(--fg2);
  padding: 0 1.4rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .6rem;
}
.marq-i::before { content: "◇"; color: var(--brand); font-size: .7rem; }
.marq-i:hover { color: var(--fg); }

/* ---------- sekcije ---------- */
.sect { padding: clamp(4rem, 11vw, 8rem) 0; border-top: 1px solid var(--line); }
.sect-top { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: clamp(1.6rem, 4vw, 2.8rem); }
.lbl { font-family: var(--fm); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brand); }
.lbl-n { color: var(--muted); }
.h2 {
  margin: 0 0 .6rem;
  font-size: clamp(2rem, 5.6vw, 3.9rem); font-weight: 600;
  letter-spacing: -.028em; line-height: 1.02;
}
.lede { margin: 0; max-width: 66ch; color: var(--fg2); }

/* ---------- oblasti: mozaik sa 1px linijama ---------- */
.areas {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.area {
  background: var(--bg); padding: clamp(1.4rem, 3vw, 2.2rem);
  display: grid; gap: .7rem; align-content: start;
  transition: background .25s ease;
}
.area:hover { background: var(--tile); }
.area-ico { font-family: var(--fm); font-size: 1.1rem; color: var(--brand); }
.area-t { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 500; letter-spacing: -.015em; line-height: 1.15; }
.area-p { margin: 0; color: var(--fg2); font-size: .97rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.chip {
  font-family: var(--fm); font-size: .7rem; letter-spacing: .03em; font-style: normal;
  border: 1px solid var(--line2); color: var(--fg2);
  padding: .22rem .5rem; border-radius: 2px;
}
.chip-b { border-color: color-mix(in srgb, var(--brand) 45%, var(--line2)); color: var(--brand); }

/* status */
.st { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--fm); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fg2); }
.st i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.st-live i { background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.st-dev i { background: var(--warm); }
.st-internal i { background: var(--muted); }

/* godište u osi */
.axis-year { padding: 1.5rem 0 .5rem; }
.axis-y2 { font-family: var(--fd); font-weight: 700; font-size: clamp(1.4rem, 3.4vw, 2.2rem); letter-spacing: -.03em; color: var(--fg); }

/* ---------- radovi ---------- */
.feat {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-bottom: 1px; align-items: stretch;
}
.feat-body { background: var(--tile2); padding: clamp(1.5rem, 3.4vw, 2.6rem); display: grid; gap: .9rem; align-content: center; }
.feat-media { background: var(--tile2); display: grid; place-items: center; overflow: hidden; min-height: 300px; }
.feat-media img { width: 100%; height: 100%; object-fit: cover; }
.feat-t { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.feat-p { margin: 0; color: var(--fg2); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile {
  background: var(--bg); padding: clamp(1.1rem, 2.2vw, 1.6rem);
  display: grid; gap: .55rem; align-content: start; min-height: 195px;
  transition: background .22s ease;
}
.tile:hover { background: var(--tile); }
.tile-h { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.tile-n { font-family: var(--fm); font-size: .7rem; color: var(--muted); }
.tile-arr { font-family: var(--fm); color: var(--muted); transition: transform .22s ease, color .22s ease; }
.tile:hover .tile-arr { transform: translate(3px, -3px); color: var(--brand); }
.tile-t { margin: 0; font-size: 1.12rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; }
.tile-s { margin: 0; color: var(--muted); font-size: .88rem; }
.tile-m { margin-top: auto; display: flex; flex-wrap: wrap; gap: .3rem; }

/* ---------- osa rada ---------- */
.axis { display: grid; gap: 0; border-top: 1px solid var(--line); }
.axis-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 1rem; align-items: baseline; padding: .95rem .2rem; border-bottom: 1px solid var(--line); transition: background .2s; }
.axis-row:hover { background: var(--tile); }
.axis-y { font-family: var(--fm); font-size: .78rem; color: var(--warm); }
.axis-t { font-size: 1.02rem; }
.axis-s { color: var(--muted); font-size: .86rem; text-align: right; }

/* ---------- brojke ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--bg); padding: clamp(1.2rem, 2.6vw, 1.9rem); }
.stat-n { font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--brand); }
.stat-l { font-family: var(--fm); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: .5rem; }

/* ---------- kontakt ---------- */
.mail {
  font-family: var(--fm); font-size: clamp(.95rem, 2.6vw, 1.7rem);
  border-bottom: 1px solid var(--brand); padding-bottom: .15em; word-break: break-all;
}

/* ---------- podnožje ---------- */
.foot { border-top: 1px solid var(--line); padding: clamp(2.4rem, 6vw, 4rem) 0 2rem; }
.foot-in { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: flex-end; }
.foot-mark { font-family: var(--fd); font-weight: 700; font-size: clamp(3.4rem, 9vw, 6.5rem); line-height: .8; color: var(--line2); }
.foot-links { display: flex; gap: 1.1rem; flex-wrap: wrap; font-family: var(--fm); font-size: .8rem; }
.foot-note { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- na vrh ---------- */
.top-btn {
  position: fixed; right: clamp(.8rem, 2vw, 1.6rem); bottom: clamp(.8rem, 2vw, 1.6rem); z-index: 45;
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--brand); border-radius: var(--r);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  color: var(--brand); cursor: pointer; font-size: .95rem;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s;
}
.top-btn.on { opacity: 1; visibility: visible; transform: none; }
.top-btn:hover { background: var(--brand); color: var(--brand-ink); }

/* ---------- kursor: sistemski (bez prstena koji prati miš) ---------- */
a, button, summary, .tile, .mini-a, .area, .feat { cursor: pointer; }

/* ---------- preloader ---------- */
.pre {
  position: fixed; inset: 0; z-index: 80; background: var(--bg);
  display: grid; place-items: center; gap: 1rem;
  transition: opacity .45s ease, visibility .45s ease;
}
.pre.off { opacity: 0; visibility: hidden; }
.pre-n { font-family: var(--fm); font-size: clamp(2rem, 8vw, 4.5rem); font-weight: 500; letter-spacing: -.02em; color: var(--fg); }
.pre-b { width: min(240px, 50vw); height: 1px; background: var(--line2); position: relative; }
.pre-b i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand); }

/* ---------- otkrivanje pri skrolu ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }

/* ============================================================
   Dosje projekta
   ============================================================ */
.dhead { padding: clamp(6.5rem, 16vw, 10rem) 0 clamp(2rem, 5vw, 3.4rem); }
.dnum { font-family: var(--fm); font-size: .78rem; letter-spacing: .2em; color: var(--warm); }
.dtitle { margin: .5rem 0 0; font-size: clamp(2.1rem, 6.2vw, 4.4rem); font-weight: 600; letter-spacing: -.035em; line-height: .98; }
.dsub { margin: 1rem 0 0; max-width: 70ch; color: var(--fg2); font-size: clamp(1rem, 1.4vw, 1.16rem); }
.dmeta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(1.6rem, 4vw, 2.6rem); }
.dmeta-c { background: var(--tile2); padding: 1rem 1.15rem; }
.dmeta-k { font-family: var(--fm); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.dmeta-v { margin-top: .35rem; font-size: .95rem; }
.dmeta-v a { color: var(--brand); }

.fig { margin: 0; border: 1px solid var(--line); background: var(--tile); }
.fig img { width: 100%; }
.fig-cap { border-top: 1px solid var(--line); padding: .6rem .9rem; font-family: var(--fm); font-size: .74rem; color: var(--muted); }

.step { display: grid; grid-template-columns: 74px 1fr; gap: clamp(.8rem, 2.5vw, 2rem); padding: clamp(1.6rem, 4vw, 2.6rem) 0; border-top: 1px solid var(--line); }
.step-n { font-family: var(--fm); font-size: .8rem; color: var(--warm); letter-spacing: .1em; }
.step-c { display: grid; gap: .9rem; }
.step-t { margin: 0; font-size: clamp(1.2rem, 2.6vw, 1.8rem); font-weight: 500; letter-spacing: -.02em; }
.ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.ul li { display: grid; grid-template-columns: 18px 1fr; gap: .6rem; color: var(--fg2); }
.ul li::before { content: "✓"; color: var(--brand); font-family: var(--fm); font-size: .85rem; line-height: 1.7; }

.layers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.layer { background: var(--bg); padding: clamp(1.1rem, 2.4vw, 1.6rem); display: grid; gap: .6rem; align-content: start; }
.layer-t { margin: 0; font-size: 1.08rem; font-weight: 500; }
.layer-s { margin: 0; color: var(--fg2); font-size: .94rem; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2rem; border-top: 1px solid var(--line); }
.fact { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.fact-k { font-family: var(--fm); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fact-v { text-align: right; font-size: .95rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(2rem, 5vw, 3.4rem); }
.pager-a { background: var(--bg); padding: 1.2rem 1.35rem; display: grid; gap: .3rem; transition: background .2s; }
.pager-a:hover { background: var(--tile); }
.pager-a:last-child { text-align: right; }
.pager-k { font-family: var(--fm); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pager-t { font-size: 1.05rem; }

.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mini-a { background: var(--bg); padding: .7rem .85rem; font-size: .86rem; display: grid; gap: .15rem; transition: background .2s; }
.mini-a:hover { background: var(--tile); }
.mini-n { font-family: var(--fm); font-size: .62rem; color: var(--muted); }
.mini-a[aria-current="true"] { background: var(--tile); }
.mini-a[aria-current="true"] .mini-n { color: var(--brand); }

.note { border: 1px solid var(--line); border-left: 2px solid var(--brand); padding: .9rem 1.1rem; color: var(--fg2); font-size: .92rem; }

/* ---------- responsivno ---------- */
@media (max-width: 1000px) {
  .areas, .layers { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .mini { grid-template-columns: repeat(3, 1fr); }
  .feat { grid-template-columns: 1fr; }
  .feat-media { min-height: 240px; order: -1; }
  .dmeta { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .tb-in { height: auto; min-height: 58px; padding: .55rem 0; flex-wrap: wrap; gap: .35rem .5rem; }
  .tb-nav {
    order: 3; width: 100%; margin: 0; gap: 1.1rem;
    overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
    mask-image: linear-gradient(90deg, #000 0, #000 92%, transparent 100%);
  }
  .tb-nav::-webkit-scrollbar { display: none; }
  .tb-txt { font-size: .85rem; }
  .tb-num { display: none; }
  .mark-t { display: none; }
  .hero { padding-top: 140px; }
  .dhead { padding-top: 8.5rem; }
  [id] { scroll-margin-top: 104px; }
  .tiles, .mini, .stats { grid-template-columns: repeat(2, 1fr); }
  .stats { }
  .step { grid-template-columns: 1fr; gap: .5rem; }
  .facts { grid-template-columns: 1fr; }
  .axis-row { grid-template-columns: 1fr; gap: .25rem; }
  .axis-s { text-align: left; }
  .pager { grid-template-columns: 1fr; }
  .pager-a:last-child { text-align: left; }
  .hero { min-height: 88svh; }
}

@media (max-width: 460px) {
  .tiles, .mini { grid-template-columns: 1fr; }
}

/* ---------- bez animacija ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rv { opacity: 1; transform: none; }
  .marq { mask-image: none; }
  .marq-t { animation: none; flex-wrap: wrap; width: auto; }
}

/* ---------- štampa ---------- */
@media print {
  body { background: #fff; color: #000; }
  body::before, body::after, .tb, .top-btn, .pre, .strip, .cue { display: none !important; }
  .sect, .step { border-color: #ccc; }
  .feat, .tiles, .areas, .layers, .dmeta, .pager, .mini, .stats { border-color: #ccc; background: #fff; }
  .area, .tile, .layer, .dmeta-c, .feat-body, .feat-media, .stat, .mini-a, .pager-a { background: #fff; }
  a { text-decoration: underline; }
  .dtitle { font-size: 2rem; }
}


/* ---------- padajući meni jezika (EN → DE → FR → AR → SR) ---------- */
.langmenu { position: relative; font-family: var(--fm); font-size: .76rem; letter-spacing: .05em; }
.langmenu > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .4rem;
  padding: .3rem .5rem; border: 1px solid var(--line); border-radius: var(--r);
  color: var(--fg2, var(--fg)); background: transparent;
  transition: border-color .2s, color .2s;
}
.langmenu > summary::-webkit-details-marker { display: none; }
.langmenu > summary::marker { content: ""; }
.langmenu > summary:hover { border-color: var(--brand); color: var(--brand); }
.langmenu[open] > summary { border-color: var(--brand); color: var(--brand); }
.langmenu .lm-caret { width: 9px; height: 6px; opacity: .75; transition: transform .18s; }
.langmenu[open] .lm-caret { transform: rotate(180deg); }
.langmenu:not([open]) > .lm-list { display: none; }
.lm-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + .4rem); z-index: 45; margin: 0;
  padding: .28rem; list-style: none; min-width: 11.5rem;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--fg) 14%, transparent);
  max-width: calc(100vw - 1.5rem);
}
.lm-list a {
  display: flex; align-items: baseline; gap: .55rem; padding: .36rem .5rem;
  text-decoration: none; color: var(--muted); border-radius: 2px;
}
.lm-list a:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--fg); }
.lm-list a.is-current { color: var(--fg); background: color-mix(in srgb, var(--fg) 4%, transparent); }
.lm-list a.is-current .lm-c { color: var(--brand); }
.lm-list .lm-c { min-width: 1.7rem; letter-spacing: .08em; }
.lm-list .lm-n { font-size: .84em; opacity: .85; letter-spacing: 0; }
@media (max-width: 720px) {
  .langmenu .lm-n { display: none; }
  .langmenu > summary { padding: .26rem .45rem; }
  .lm-list { min-width: 9.5rem; }
}

/* ---------- ikonice za temu (sunce/mjesec), bez teksta ---------- */
.theme .ic, .ib .ic { width: 16px; height: 16px; display: block; }
.ib .ic { width: 15px; height: 15px; }
html[data-theme="light"] .ic-sun { display: none; }
html[data-theme="dark"] .ic-moon { display: none; }
.foot-langs { margin: 1.2rem 0 0; }
.foot-langs a {
  display: inline-block; margin-inline-end: .9rem; font-family: var(--fm);
  font-size: .78rem; color: var(--muted); text-decoration: none; letter-spacing: .04em;
}
.foot-langs a:hover, .foot-langs a.is-cur { color: var(--brand); }
.foot-langs { display: flex; flex-wrap: wrap; gap: .2rem .2rem; }

/* ---------- arapski: RTL i font ---------- */
html[lang="ar"] body { font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif; }
html[lang="ar"] .hero-name, html[lang="ar"] .h2, html[lang="ar"] .dtitle, html[lang="ar"] .step-t, html[lang="ar"] .lbl { letter-spacing: 0; }
[dir="rtl"] .tb-txt::before { content: ""; }
[dir="rtl"] .tb-txt::after { content: " //"; color: var(--brand); font-family: var(--fm); font-size: .85em; }
[dir="rtl"] .marq-t { animation-direction: reverse; }
[dir="rtl"] .ul li, [dir="rtl"] .layer .ul li { padding-inline-start: 0; padding-inline-end: 1.5rem; }
[dir="rtl"] .hero-lede, [dir="rtl"] .lede, [dir="rtl"] .dsub, [dir="rtl"] .area-p { text-align: right; }
[dir="rtl"] .hero-cta { justify-content: flex-start; }
