/* =====================================================================
   PRODUCT VERZIJA: čist, čitljiv product designer portfolio
   ===================================================================== */
:root {
  --bg: #F3F3F0;
  --fg: #111111;
  --fg-2: #3A3A37;
  --dim: #74746E;
  --line: rgba(17,17,17,0.10);
  --line-2: rgba(17,17,17,0.18);
  --card: #E8E8E3;
  --acc: #FFA8E2;
  --radius: 14px;
  --max: 1240px;
  --pad: 32px;
  --ease: cubic-bezier(.16,1,.3,1);
}
*, *::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: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--acc); color: var(--fg); }
h1, h2, h3, h4, p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.label {
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.4;
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--dim);
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 1px rgba(0,0,0,.25) inset; margin-right: 8px; vertical-align: 1px; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; }
.nav-logo img { height: 22px; width: auto; filter: invert(1); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--fg-2); transition: color .2s ease; }
.nav-links a:not(.btn):hover, .nav-links a.is-active { color: var(--fg); }
.nav-links a.is-active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg);
  transition: transform .3s var(--ease), background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn i { font-style: normal; transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--fg); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .2s ease; }
.link-arrow:hover { border-color: var(--fg); }

/* ---------- HERO (home) ---------- */
.hero { padding: 88px 0 72px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 64px; align-items: end; }
.hero h1 { font-size: clamp(42px, 5.6vw, 84px); line-height: 1.0; letter-spacing: -0.045em; font-weight: 500; margin: 20px 0 28px; }
.hero h1 em { font-style: normal; color: var(--dim); }
.hero-sub { font-size: 20px; line-height: 1.5; color: var(--fg-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--card); aspect-ratio: 4 / 5; max-height: 560px; justify-self: end; width: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 48px; }
.trust .label { margin-right: 8px; }
.trust span:not(.label) { font-weight: 500; font-size: 17px; color: var(--fg-2); }

/* ---------- SECTIONS ---------- */
.sec { padding: 112px 0 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 500; margin-top: 10px; }
.sec-head p { color: var(--fg-2); max-width: 30em; margin-top: 12px; }

/* ---------- CASE CARDS (velike, home + work) ---------- */
.cases { display: grid; gap: 24px; }
.case {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); overflow: hidden;
  transition: border-color .3s ease, box-shadow .4s var(--ease);
}
.case:hover { border-color: var(--line-2); box-shadow: 0 24px 60px -32px rgba(0,0,0,.25); }
.case-img { background: var(--card); overflow: hidden; aspect-ratio: 16 / 11; }
.case-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.case:hover .case-img img { transform: scale(1.03); }
.case-body { padding: 36px; display: flex; flex-direction: column; gap: 18px; }
.case-body .label { display: flex; justify-content: space-between; }
.case-body h3 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 500; }
.case-body p { color: var(--fg-2); font-size: 18px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 13px; line-height: 1; padding: 8px 11px; border-radius: 999px; background: var(--bg); color: var(--fg-2); border: 1px solid var(--line); }
.case-body .link-arrow { margin-top: auto; align-self: flex-start; }

/* ---------- SMALL CARDS (web & brand) ---------- */
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mini { display: block; }
.mini-img { border-radius: var(--radius); overflow: hidden; background: var(--card); aspect-ratio: 4 / 3; }
.mini-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.mini:hover .mini-img img { transform: scale(1.04); }
.mini-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; }
.mini-meta h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.mini p { color: var(--dim); font-size: 15px; margin-top: 4px; max-width: 34em; }

/* ---------- PROCESS / PRINCIPLES ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.step { padding: 28px 28px 0 0; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step h3 { font-size: 21px; font-weight: 500; letter-spacing: -0.02em; margin: 40px 0 10px; }
.step p { color: var(--fg-2); font-size: 16px; }

/* ---------- CTA ---------- */
.cta { margin-top: 128px; background: var(--fg); color: var(--bg); border-radius: calc(var(--radius) + 6px); padding: 72px 56px; display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 40px; align-items: end; }
.cta h2 { font-size: clamp(32px, 4vw, 60px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 500; }
.cta p { color: rgba(243,243,240,.65); margin-top: 18px; font-size: 18px; max-width: 30em; }
.cta .btn { background: var(--acc); color: var(--fg); border-color: var(--acc); }
.cta .btn.ghost { background: transparent; color: var(--bg); border-color: rgba(243,243,240,.3); }
.cta .btn.ghost:hover { border-color: var(--bg); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- FOOTER ---------- */
.foot { margin-top: 96px; border-top: 1px solid var(--line); padding: 28px 0 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--dim); }
.foot nav { display: flex; flex-wrap: wrap; gap: 24px; }
.foot a:hover { color: var(--fg); }

/* ---------- PAGE HEAD (work, about) ---------- */
.p-head { padding: 80px 0 24px; }
.p-head h1 { font-size: clamp(44px, 6vw, 88px); line-height: 1; letter-spacing: -0.045em; font-weight: 500; margin-top: 16px; }
.p-head p { font-size: 20px; color: var(--fg-2); max-width: 34em; margin-top: 24px; }

/* ---------- ABOUT ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 72px; padding-top: 56px; align-items: start; }
.about-photo { border-radius: var(--radius); overflow: hidden; background: var(--card); aspect-ratio: 4 / 5; margin: 0; position: sticky; top: 100px; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.prose p { font-size: 19px; line-height: 1.6; color: var(--fg-2); }
.prose p + p { margin-top: 1.1em; }
.prose p.big-p { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.3; letter-spacing: -0.02em; color: var(--fg); }
.rows { border-top: 1px solid var(--line-2); margin-top: 56px; }
.row { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.row strong { font-weight: 500; font-size: 18px; }
.row span { color: var(--fg-2); }
.row .label { text-align: right; }
.h-sm { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; margin: 64px 0 0; }
.h-sm + .rows { margin-top: 20px; }
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.service { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.service h4 { font-size: 17px; font-weight: 500; }
.service p { font-size: 15px; color: var(--dim); margin-top: 6px; line-height: 1.5; }

/* =====================================================================
   CASE STUDY
   ===================================================================== */
.cs-hero { padding: 56px 0 48px; }
.cs-back { display: inline-flex; gap: 8px; color: var(--dim); font-size: 15px; transition: color .2s ease; }
.cs-back:hover { color: var(--fg); }
.cs-hero .label { margin-top: 48px; display: block; }
.cs-hero h1 { font-size: clamp(48px, 7vw, 108px); line-height: 0.95; letter-spacing: -0.05em; font-weight: 500; margin-top: 14px; }
.cs-lede { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; letter-spacing: -0.02em; max-width: 30em; margin-top: 28px; color: var(--fg-2); }
.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 24px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line-2); align-items: start; }
.cs-meta div { display: grid; gap: 6px; }
.cs-meta dd { margin: 0; font-size: 16px; line-height: 1.4; }
.cs-meta dt { margin: 0; }
.cs-meta .btn { align-self: center; }

.cs-cover { border-radius: calc(var(--radius) + 4px); overflow: hidden; background: var(--card); }
.cs-cover img { width: 100%; height: auto; }

/* snapshot: problem / uloga / rezultat u tri kolone */
.snap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.snap > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.snap h3 { font-size: 18px; font-weight: 500; margin: 14px 0 8px; letter-spacing: -0.01em; }
.snap p { font-size: 16px; color: var(--fg-2); }

/* sekcija: label lijevo (sticky), tekst desno */
.cs-sec { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 0 48px; padding-top: 112px; }
.cs-sec > .label { position: sticky; top: 96px; align-self: start; padding-top: 10px; }
.cs-sec h2 { font-size: clamp(28px, 2.8vw, 40px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 500; max-width: 22em; }
.cs-sec .prose { margin-top: 24px; max-width: 40em; }
.cs-sec .prose p { font-size: 18px; }

.journey { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 8px; counter-reset: j; }
.journey li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 18px; font-size: 15px; line-height: 1.4; counter-increment: j; position: relative; }
.journey li::before { content: counter(j, decimal-leading-zero); display: block; font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--dim); margin-bottom: 18px; }
.journey li strong { display: block; font-weight: 500; font-size: 16px; margin-bottom: 4px; }
.journey li span { color: var(--dim); }

/* ključne odluke */
.decision { padding-top: 96px; }
.decision-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 0 48px; margin-bottom: 36px; }
.decision-head .num { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--dim); padding-top: 8px; }
.decision-head h3 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 500; }
.decision-head p { margin-top: 14px; font-size: 18px; color: var(--fg-2); max-width: 40em; }
.decision-head .why { margin-top: 18px; padding-left: 16px; border-left: 2px solid var(--acc); font-size: 16px; color: var(--fg-2); max-width: 40em; }
.decision-head .why b { font-weight: 500; color: var(--fg); }

.fig { margin: 0; }
.fig + .fig { margin-top: 24px; }
.fig-media { border-radius: calc(var(--radius) + 4px); overflow: hidden; background: var(--card); }
.fig-media img, .fig-media video { width: 100%; height: auto; }
.fig-media video { max-height: 86vh; margin: 0 auto; object-fit: contain; }
.fig figcaption { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 0 48px; margin-top: 14px; font-size: 14px; color: var(--dim); }
.fig figcaption span:last-child { max-width: 44em; }
.fig.tall .fig-media { max-width: 880px; margin: 0 auto; }
.cs-cover img { max-height: 82vh; object-fit: cover; }
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* rezultat */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.stat strong { display: block; font-size: clamp(32px, 3.4vw, 48px); line-height: 1; letter-spacing: -0.04em; font-weight: 500; }
.stat span { display: block; margin-top: 12px; font-size: 15px; color: var(--fg-2); line-height: 1.4; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; max-width: 40em; }
.checks li { padding-left: 30px; position: relative; font-size: 17px; color: var(--fg-2); }
.checks li::before { content: ''; position: absolute; left: 0; top: 0.32em; width: 16px; height: 16px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 1px rgba(0,0,0,.2) inset; }

/* sljedeći projekat */
.next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin-top: 140px; border-radius: calc(var(--radius) + 4px); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: box-shadow .4s var(--ease); }
.next:hover { box-shadow: 0 24px 60px -32px rgba(0,0,0,.25); }
.next-body { padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.next-body h2 { font-size: clamp(36px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.045em; font-weight: 500; margin-top: 10px; }
.next-body p { color: var(--fg-2); margin-top: 14px; max-width: 26em; }
.next-img { aspect-ratio: 16 / 10; background: var(--card); overflow: hidden; }
.next-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.next:hover .next-img img { transform: scale(1.04); }

/* ---------- REVEAL ---------- */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 64px; }
  .hero-photo { max-width: 420px; justify-self: start; }
  .case { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .step:nth-child(n+3) { margin-top: 24px; }
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-meta .btn { justify-self: start; }
  .cs-sec, .decision-head, .fig figcaption { grid-template-columns: 1fr; }
  .cs-sec > .label { position: static; margin-bottom: 16px; padding-top: 0; }
  .decision-head .num { margin-bottom: 10px; padding-top: 0; }
  .fig figcaption span:first-child { display: none; }
  .about { grid-template-columns: 1fr; gap: 48px; }
  .about-photo { position: static; max-width: 420px; }
  .cta { grid-template-columns: 1fr; padding: 56px 40px; }
}
@media (max-width: 760px) {
  :root { --pad: 16px; }
  body { font-size: 16px; }
  .nav-in { height: 60px; }
  .nav-links { gap: 18px; font-size: 14px; }
  .nav-links .hide-sm { display: none; }
  .hero { padding: 48px 0 56px; }
  .hero-sub { font-size: 18px; }
  .trust { gap: 10px 24px; }
  .trust .label { width: 100%; }
  .sec { padding-top: 80px; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .case-body { padding: 24px; }
  .mini-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 24px 0 0; border-left: 0; }
  .step:nth-child(n+2) { margin-top: 0; border-top: 1px solid var(--line); margin-top: 24px; }
  .step h3 { margin-top: 16px; }
  .cta { padding: 40px 24px; margin-top: 96px; }
  .snap { grid-template-columns: 1fr; }
  .journey { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr; }
  .fig-pair { grid-template-columns: 1fr; gap: 16px; }
  .cs-sec { padding-top: 80px; }
  .decision { padding-top: 72px; }
  .next { grid-template-columns: 1fr; margin-top: 96px; }
  .next-body { padding: 28px; }
  .row { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .row span { grid-column: 1 / -1; grid-row: 2; }
  .services { grid-template-columns: 1fr; }
}
@media (min-width: 1025px) and (max-width: 1240px) {
  .case-body { padding: 28px; }
}
