/* =========================================================
   PROSTOR — Smjer A "Lapor i sjena"
   Fontovi: Archivo (varijabilni, širina 62–125 %) + JetBrains Mono.
   Sve boje, fontovi i razmaci na jednom mjestu (:root).
   ========================================================= */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; 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; }
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; 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; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; 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; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; 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; }

:root {
  /* Boje */
  --c-paper: #EEEAE3;
  --c-ink: #1C1B18;
  --c-ink-soft: #4F4A42;
  --c-muted: #6F695E;       /* sitne oznake (AA na papiru) */
  --c-muted-large: #8C8578; /* samo za velike naslove */
  --c-line: #CFC8BC;
  --c-accent: #9C4A2F;      /* samo CTA i fokus */
  --c-on-dark: #EEEAE3;
  --c-on-dark-muted: #A8A193;

  /* Fontovi */
  --f-sans: "Archivo", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --wide: 125%;             /* širina naslova (Archivo Expanded) */

  /* Veličine teksta */
  --t-label: 0.6875rem;                            /* 11px, mono */
  --t-body: 1rem;
  --t-name: clamp(3.4rem, 11.5vw, 11rem);           /* _prostor. u heroju */
  --t-lead: clamp(1.6rem, 3.2vw, 3rem);
  --t-h2: clamp(2rem, 4.4vw, 4.25rem);
  --t-row: clamp(.95rem, 1.6vw, 1.5rem);
  --t-wordmark: clamp(3rem, 16vw, 16rem);

  /* Razmaci */
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --section: clamp(5rem, 11vw, 10.5rem);
  --max: 1600px;

  /* Pokret */
  --ease: cubic-bezier(.2, .7, .1, 1);
  --dur: 900ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--c-paper); color: var(--c-ink); font: 400 var(--t-body)/1.55 var(--f-sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:hover { color: var(--c-accent); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.skip { position: absolute; left: var(--gutter); top: -100px; background: var(--c-ink); color: var(--c-paper); padding: 12px 16px; z-index: 100; }
.skip:focus { top: 12px; }

/* Naslovi u širokom rezu */
.wide { font-stretch: var(--wide); }
/* Mono oznake */
.label, .label-link, .lang, .meta-row, .stack__year, .stack__cat, .badge, .hero__badge,
.service__num, .button, .site-footer__cols, .nav-toggle {
  font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .08em; text-transform: uppercase; font-weight: 400;
}
.muted { color: var(--c-muted-large); }
.todo { color: var(--c-accent); }

/* ---------- Zaglavlje ---------- */
.site-header { position: relative; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem var(--gutter); border-bottom: 1px solid var(--c-line); background: var(--c-paper); color: var(--c-ink); }
.site-header__left { display: flex; align-items: center; gap: 2rem; }
.logo { font-weight: 600; font-stretch: var(--wide); font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; line-height: 1; }
.clock { display: none; white-space: nowrap; font-family: var(--f-mono); font-size: var(--t-label); line-height: 1.45; letter-spacing: .04em; }
.clock__time { opacity: .65; font-variant-numeric: tabular-nums; }
.nav-toggle { min-height: 44px; padding: 0 4px; background: none; border: 0; color: inherit; cursor: pointer; }
.site-nav { display: none; width: 100%; }
.site-nav.is-open { display: block; }
.site-nav ul { display: flex; flex-direction: column; border-top: 1px solid currentColor; margin-top: .5rem; }
.site-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--c-line); text-decoration: none; font-size: .875rem; }
.lang { margin-top: 1rem; }
.lang a { opacity: .7; text-decoration: none; display: inline-block; padding: 12px 4px; }
.header-cta { display: none; align-items: center; gap: .5rem; text-decoration: none; font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .04em; padding: 12px 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

@media (min-width: 900px) {
  .site-header { display: grid; grid-template-columns: 1fr auto 1fr; }
  .clock { display: block; }
  .nav-toggle { display: none; }
  .site-nav { display: flex !important; width: auto; align-items: center; gap: 2rem; justify-self: center; }
  .site-nav ul { flex-direction: row; gap: 1.75rem; border: 0; margin: 0; }
  .site-nav li a { padding: 12px 0; border: 0; font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .04em; text-transform: none; }
  .lang { margin: 0; }
  .header-cta { display: inline-flex; justify-self: end; }
}

/* Početna: zaglavlje leži preko heroja, bijeli tekst */
.has-hero .site-header { position: absolute; top: 0; left: 0; right: 0; background: transparent; border-bottom: 0; color: #F4F1EB; }
.has-hero .site-header a:hover { color: #fff; opacity: .8; }
.has-hero .site-nav.is-open { background: rgba(28, 27, 24, .92); margin: .5rem calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 1rem; }
.has-hero .site-nav li a { border-color: rgba(244, 241, 235, .25); }

/* ---------- Hero: tamna slika, naslov gore, golemi _prostor. na donjem rubu ---------- */
.hero { position: relative; height: 100svh; min-height: 600px; overflow: hidden; color: #F4F1EB; background: #2A2925; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% center; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(22, 21, 18, .55) 0%, rgba(22, 21, 18, .15) 30%, rgba(22, 21, 18, .2) 55%, rgba(22, 21, 18, .7) 100%),
    rgba(22, 21, 18, .18); }
.hero__lead { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); top: 18%; font-size: clamp(1.75rem, 3.4vw, 3.25rem); line-height: 1.04; letter-spacing: -.03em; font-weight: 400; max-width: 16ch; }
.hero__name { position: absolute; z-index: 2; left: var(--gutter); bottom: 10.5rem; margin-left: -.04em; font-weight: 600; font-stretch: var(--wide); font-size: clamp(3.4rem, 14vw, 15rem); line-height: .78; letter-spacing: -.05em; white-space: nowrap; }
.hero__aside { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 1.25rem; display: grid; gap: .75rem; font-size: .875rem; line-height: 1.45; max-width: 36ch; }
.hero__aside a { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .04em; padding: 6px 0; justify-self: start; }
.hero__aside a:hover { color: #fff; opacity: .8; }
.hero__badge { position: absolute; z-index: 2; right: var(--gutter); top: calc(18% + .5rem); background: rgba(244, 241, 235, .14); border: 1px solid rgba(244, 241, 235, .35); padding: 4px 8px; font-size: 10px; }

@media (min-width: 900px) {
  .hero__lead { top: 22%; }
  .hero__name { bottom: .16em; }
  .hero__aside { left: auto; right: var(--gutter); bottom: 2rem; width: min(28ch, 22vw); }
  .hero__badge { top: auto; bottom: 2rem; right: auto; left: calc(var(--gutter)); display: none; }
}

/* Uvodna animacija heroja */
.js .hero__img { transform: scale(1.06); opacity: 0; transition: transform 2000ms var(--ease), opacity 1200ms var(--ease); }
.js .hero__lead, .js .hero__aside { opacity: 0; transform: translateY(16px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.js .hero__name { opacity: 0; transform: translateY(12%); transition: opacity 1100ms var(--ease) 150ms, transform 1300ms var(--ease) 150ms; }
.js .hero__aside { transition-delay: 350ms; }
.js.is-loaded .hero__img, .js.is-loaded .hero__lead, .js.is-loaded .hero__name, .js.is-loaded .hero__aside { opacity: 1; transform: none; }

/* ---------- Red ispod heroja ---------- */
.meta-row { display: grid; gap: 1.5rem; padding: 1.75rem var(--gutter); border-bottom: 1px solid var(--c-line); }
.meta-row .muted { color: var(--c-muted); }
.link-line { justify-self: start; text-decoration: none; border-bottom: 1px solid currentColor; padding: 10px 0 4px; }
@media (min-width: 720px) { .meta-row { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Izjava ---------- */
.statement { display: grid; gap: 2rem; padding: var(--section) var(--gutter); max-width: var(--max); }
.statement__text { font-stretch: 112%; font-weight: 400; font-size: var(--t-lead); line-height: 1.12; letter-spacing: -.02em; max-width: 22ch; }
@media (min-width: 900px) { .statement { grid-template-columns: 1fr 2fr; } }

/* ---------- Projekti: sticky stack ----------
   Svaki projekt je ploča (traka + slika) koja se zalijepi na vrh ispod traka prethodnih projekata
   (top = redni broj × visina trake) i zauzme ostatak ekrana. Sljedeća ploča klizi preko nje.
   Samo CSS (position: sticky); --i postavlja js/main.js (u WordPressu: redni broj u petlji). */
.projects { padding-bottom: var(--section); }
.projects__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--gutter) 1.25rem; }
.label-link { text-decoration: none; padding: 12px 0; }

.stack { --bar: 46px; }
.stack__item {
  position: sticky;
  top: calc(var(--i, 0) * var(--bar));
  height: calc(100vh - var(--i, 0) * var(--bar));
  height: calc(100svh - var(--i, 0) * var(--bar));
  min-height: 260px;
  display: flex; flex-direction: column;
  background: var(--c-paper);
}
.stack__bar {
  flex: none; height: var(--bar);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem;
  padding: 0 var(--gutter);
  background: var(--c-paper); border-top: 1px solid var(--c-ink); border-bottom: 1px solid var(--c-ink);
  text-decoration: none;
}
.stack__title { font-weight: 500; font-stretch: var(--wide); font-size: var(--t-row); line-height: 1; letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack__year, .stack__cat, .stack__place, .stack__arrow { display: none; }
.stack__bar:hover .stack__title { color: var(--c-accent); }
.stack__media { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.stack__media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: var(--gutter); bottom: 14px; background: rgba(238, 234, 227, .9); color: var(--c-ink); font-size: 10px; padding: 5px 8px; }

@media (min-width: 900px) {
  .stack { --bar: 52px; }
  .stack__bar { grid-template-columns: minmax(0, 6fr) minmax(0, 1fr) minmax(0, 2fr) minmax(0, 3fr) 32px; }
  .stack__year { display: block; color: var(--c-muted); }
  .stack__cat { display: block; color: var(--c-muted); }
  .stack__place { display: block; font-weight: 500; font-stretch: var(--wide); font-size: var(--t-row); line-height: 1; text-transform: uppercase; text-align: right; white-space: nowrap; }
  .stack__arrow { display: block; font-size: 1.25rem; text-align: right; transition: transform 400ms var(--ease); }
  .stack__bar:hover .stack__arrow { transform: translateX(6px); }
}

/* Blagi pomak slike dok ploča ulazi (gdje preglednik podržava scroll-timeline) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .stack__media img { animation: stack-img linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    @keyframes stack-img { from { transform: scale(1.08) translateY(-3%); } to { transform: none; } }
  }
}

/* ---------- Usluge ---------- */
.services { display: grid; gap: 3rem; padding: 0 var(--gutter) var(--section); }
.services__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.services__body .label { margin-bottom: 3rem; }
.service { display: grid; grid-template-columns: 3rem 1fr; gap: .5rem; padding: 1.5rem 0; border-top: 1px solid var(--c-line); }
.service:last-child { border-bottom: 1px solid var(--c-line); }
.service__num { color: var(--c-muted); padding-top: .45rem; }
.service h3 { font-weight: 500; font-stretch: var(--wide); font-size: clamp(1.25rem, 1.9vw, 1.65rem); line-height: 1.15; letter-spacing: -.01em; margin-bottom: .4rem; }
.service p { color: var(--c-ink-soft); max-width: 46ch; }
@media (min-width: 900px) { .services { grid-template-columns: 5fr 6fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; } .services__media { position: sticky; top: 2rem; } }

/* ---------- Poziv na kontakt ---------- */
.cta { display: grid; gap: 2rem; padding: var(--section) var(--gutter); border-top: 1px solid var(--c-ink); align-items: end; }
.cta__title { font-weight: 500; font-stretch: var(--wide); font-size: var(--t-h2); line-height: 1.02; letter-spacing: -.035em; max-width: 18ch; }
.cta__body p { color: var(--c-ink-soft); margin-bottom: 1.5rem; max-width: 40ch; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.75rem; background: var(--c-accent); color: #F4F1EB; text-decoration: none; letter-spacing: .1em; transition: background 300ms; }
.button:hover { background: #82391F; color: #F4F1EB; }
@media (min-width: 900px) { .cta { grid-template-columns: 2fr 1fr; } }

/* ---------- Podnožje ---------- */
.site-footer { background: var(--c-ink); color: var(--c-on-dark); padding: 3.5rem var(--gutter) 0; overflow: hidden; }
.site-footer a { color: var(--c-on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__cols { display: grid; gap: 2rem; line-height: 1.9; }
.site-footer address { font-style: normal; }
.site-footer .todo { color: #E0A58E; }
.muted-light, .muted-light a { color: var(--c-on-dark-muted); }
@media (min-width: 720px) { .site-footer__cols { grid-template-columns: repeat(4, 1fr); } }
.wordmark { margin-top: 3rem; padding-bottom: .12em; font-weight: 600; font-stretch: var(--wide); font-size: var(--t-wordmark); line-height: 1; letter-spacing: -.05em; white-space: nowrap; margin-left: -.03em; }

/* ---------- Pojavljivanje pri skrolanju ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Smanji pokrete ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal, .js .hero__lead, .js .hero__name, .js .hero__aside, .js .hero__img { opacity: 1; transform: none; }
}
