/* ============================================================
   KKreativa — Web dizajn studio
   Brand: Archivo + Space Mono / Ink, Papir, Roza, Plava, Žuta
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --ink:    #0D0D0D;
  --paper:  #FFF7F5;
  --rose:   #E5BBC1;   /* primarni akcent — iz originalnog logotipa */
  --blue:   #8FCDEE;   /* sekundarni */
  --yellow: #F4D93B;   /* sekundarni */
  --muted:  #8a8580;

  --font-display: "Archivo", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --pad: clamp(20px, 5vw, 80px);
  --maxw: 1600px;

  --ease: cubic-bezier(0.65, 0.05, 0.1, 1);
  --slow: cubic-bezier(0.86, 0, 0.07, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }

.mono { font-family: var(--font-mono); font-size: clamp(11px, .82vw, 13px); letter-spacing: .02em; text-transform: uppercase; }

/* ---------- PRELOADER ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
}
.preloader__inner { text-align: center; width: min(80vw, 500px); }
.preloader__mark { width: 54px; margin: 0 auto 24px; }
.preloader__mark .asterisk { fill: var(--rose); animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preloader__word { overflow: hidden; }
.preloader__word span {
  display: inline-block; font-weight: 800; font-size: clamp(34px, 7vw, 76px);
  letter-spacing: -.03em; transform: translateY(110%);
}
.preloader__count { font-family: var(--font-mono); font-size: 13px; margin-top: 18px; opacity: .5; }
.preloader__pct { opacity: .5; }
.preloader__bar { height: 2px; background: rgba(255,247,245,.15); margin-top: 14px; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0; background: var(--rose); }

/* ---------- CURSOR (disabled — native pointer used) ---------- */
.cursor { display: none !important; }
.cursor--legacy { position: fixed; top: 0; left: 0; z-index: 900; pointer-events: none; mix-blend-mode: difference; }
.cursor__dot {
  position: fixed; width: 7px; height: 7px; border-radius: 50%;
  background: var(--paper); transform: translate(-50%, -50%);
}
.cursor__ring {
  position: fixed; width: 40px; height: 40px; border: 1px solid var(--paper);
  border-radius: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; transition: width .3s var(--ease), height .3s var(--ease), background .3s;
}
.cursor__label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity .2s; white-space: nowrap; }
body.cur-hover .cursor__ring { width: 64px; height: 64px; background: var(--paper); }
body.cur-hover .cursor__dot { opacity: 0; }
body.cur-label .cursor__ring { width: 84px; height: 84px; background: var(--paper); }
body.cur-label .cursor__label { opacity: 1; }
body.cur-label .cursor__dot { opacity: 0; }
@media (hover: none) { .cursor { display: none; } }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2.2vw, 30px) var(--pad);
  color: var(--ink);
  transition: transform .5s var(--ease), color .4s;
}
/* over the dark fullscreen overlay the nav flips to light */
body.menu-open .nav { color: var(--paper); }
.nav.is-hidden { transform: translateY(-105%); }
.nav__logo { display: flex; align-items: center; gap: 6px; }
.nav__logo-text { font-weight: 800; font-size: clamp(19px, 1.6vw, 24px); letter-spacing: -.03em; }
.nav__logo-mark { width: 13px; fill: var(--rose); }
.nav__links { display: flex; gap: clamp(18px, 2vw, 34px); }
.nav__links a { position: relative; font-size: 15px; overflow: hidden; }
.nav__links a span { display: inline-block; transition: transform .4s var(--ease); }
.nav__links a::after {
  content: attr(data-txt); position: absolute; left: 0; top: 100%;
}
.nav__links a { --h: 1; }
.nav__links a:hover span { transform: translateY(-130%); }
.nav__links a::before {
  content: attr(data-hover-txt);
}
.nav__right { display: flex; align-items: center; gap: 20px; }
.nav__status { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; }
.nav__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 0 var(--rose); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245,184,193,.6); } 70% { box-shadow: 0 0 0 8px rgba(245,184,193,0); } 100% { box-shadow: 0 0 0 0 rgba(245,184,193,0); } }
/* subtle menu button (opens fullscreen overlay) — not blended, shows true brand colour */
.nav__menu { display: inline-flex; align-items: center; gap: 10px; padding: 6px 4px; color: var(--ink); }
.nav__menu-label { font-size: 12px; letter-spacing: .04em; color: currentColor; transition: color .3s; }
.nav__menu-icon { position: relative; display: block; width: 22px; height: 10px; }
.nav__menu-icon i { position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform .45s var(--ease), width .45s var(--ease), background-color .3s; }
.nav__menu-icon i:nth-child(1) { top: 2px; }
.nav__menu-icon i:nth-child(2) { top: 7px; width: 70%; }
/* hover → secondary brand colour (plava) */
.nav__menu:hover { color: var(--blue); }
.nav__menu:hover .nav__menu-icon i:nth-child(2) { width: 100%; }
/* when overlay open, button sits on dark bg → light, still blue on hover */
body.menu-open .nav__menu { color: var(--paper); }
body.menu-open .nav__menu:hover { color: var(--blue); }
body.menu-open .nav__menu-icon i:nth-child(1) { transform: translateY(3px) rotate(45deg); }
body.menu-open .nav__menu-icon i:nth-child(2) { top: 2px; width: 100%; transform: translateY(0) rotate(-45deg); }

/* mobile nav */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__status { display: none; }
  .nav__menu-label { display: none; }
}

/* ---------- FULLSCREEN MENU ---------- */
.menu { position: fixed; inset: 0; z-index: 490; pointer-events: none; visibility: hidden; }
.menu__bg { position: absolute; inset: 0; background: var(--ink); transform: scaleY(0); transform-origin: top; transition: transform .7s var(--slow); }
.menu__inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(90px,12vh,140px) var(--pad) 40px; color: var(--paper); opacity: 0; transition: opacity .3s; }
body.menu-open .menu { pointer-events: auto; visibility: visible; }
body.menu-open .menu__bg { transform: scaleY(1); }
body.menu-open .menu__inner { opacity: 1; transition: opacity .4s .3s; }
.menu__meta { display: flex; justify-content: space-between; opacity: .5; }
.menu__list { list-style: none; }
.menu__list li { overflow: hidden; border-top: 1px solid rgba(255,247,245,.15); }
.menu__list li:last-child { border-bottom: 1px solid rgba(255,247,245,.15); }
.menu__list a { display: flex; align-items: baseline; gap: 20px; padding: clamp(10px,2vh,20px) 0; }
.menu__num { opacity: .5; }
.menu__label { font-weight: 800; font-size: clamp(38px, 9vw, 90px); letter-spacing: -.03em; line-height: 1; transition: transform .5s var(--ease), color .4s; }
.menu__list a:hover .menu__label { transform: translateX(30px); color: var(--rose); }
.menu__foot { display: flex; gap: 30px; }
.menu__foot a { opacity: .7; transition: opacity .3s; }
.menu__foot a:hover { opacity: 1; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh; padding: clamp(120px,16vh,180px) var(--pad) clamp(40px,6vh,60px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero__top { display: flex; justify-content: space-between; }
.hero__tag, .hero__loc { color: var(--muted); }
.hero__title { font-weight: 800; letter-spacing: -.04em; line-height: .9; font-size: clamp(52px, 13vw, 230px); text-transform: none; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title [data-line] { display: inline-block; }
.hero__title em { font-style: italic; font-weight: 800; color: var(--ink); }
.hero__star { display: inline-block; width: clamp(30px,7vw,120px); fill: var(--rose); vertical-align: middle; margin-left: .1em; }
.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: clamp(30px,5vh,50px); }
.hero__lead { max-width: 46ch; font-size: clamp(16px, 1.35vw, 21px); line-height: 1.5; }
.hero__lead strong { font-weight: 700; }
.hero__scroll { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hero__scroll-arrow { display: inline-block; animation: bob 1.6s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (max-width: 720px) { .hero__bottom { flex-direction: column; align-items: flex-start; } }

/* ---------- MARQUEE ---------- */
.marquee { overflow: hidden; border-top: 1px solid rgba(13,13,13,.12); border-bottom: 1px solid rgba(13,13,13,.12); padding: clamp(14px,1.6vw,22px) 0; background: var(--ink); color: var(--paper); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__track span { font-weight: 800; font-size: clamp(24px,3.4vw,52px); letter-spacing: -.02em; white-space: nowrap; padding-right: .3em; text-transform: uppercase; }
.marquee__track b { color: var(--rose); font-weight: 400; }

/* ---------- SECTION HEAD ---------- */
.section-head { display: flex; flex-direction: column; gap: 14px; padding: 0 0 clamp(30px,4vw,60px); border-bottom: 1px solid rgba(13,13,13,.12); margin-bottom: clamp(30px,4vw,60px); }
.section-head__idx { color: var(--muted); }
.section-head__title { font-weight: 800; font-size: clamp(34px, 6vw, 90px); letter-spacing: -.03em; line-height: .95; overflow: hidden; }
[data-line-wrap] [data-line] { display: inline-block; }

/* ---------- ABOUT ---------- */
.about { padding: clamp(80px,12vw,180px) var(--pad); display: grid; grid-template-columns: 1fr 3fr; gap: clamp(20px,4vw,60px); }
.about__label { padding-top: 10px; }
.about__label .mono { color: var(--muted); }
.about__text { font-weight: 500; font-size: clamp(26px, 3.6vw, 60px); line-height: 1.15; letter-spacing: -.02em; }
.about__text em { font-style: italic; color: var(--ink); position: relative; }
.about__text em::after { content: ""; position: absolute; left: 0; bottom: .06em; width: 100%; height: .5em; background: var(--rose); z-index: -1; opacity: .55; }
.about__words { display: inline; }
.about__word { display: inline-block; }
.about__meta { display: flex; flex-wrap: wrap; gap: clamp(30px,5vw,80px); margin-top: clamp(40px,6vw,80px); }
.about__stat { display: flex; flex-direction: column; gap: 6px; }
.about__num { font-weight: 800; font-size: clamp(36px,4vw,64px); letter-spacing: -.03em; line-height: 1; }
.about__stat .mono { color: var(--muted); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* ---------- WORK / PROJECTS ---------- */
.work { padding: clamp(60px,8vw,120px) var(--pad); }
.work__list { display: flex; flex-direction: column; }
.project {
  position: relative; display: grid; align-items: center;
  grid-template-columns: 60px 1.6fr 1fr auto;
  gap: 20px; padding: clamp(22px,3vw,42px) 0;
  border-top: 1px solid rgba(13,13,13,.14);
  transition: padding-left .5s var(--ease);
}
.work__list .project:last-child { border-bottom: 1px solid rgba(13,13,13,.14); }
.project__idx { color: var(--muted); }
.project__name { font-weight: 800; font-size: clamp(28px,4.4vw,74px); letter-spacing: -.03em; line-height: 1; transition: transform .5s var(--ease), color .4s; }
.project__cat { color: var(--muted); }
.project__year { color: var(--muted); }
.project:hover { padding-left: clamp(14px,2vw,34px); }
.project:hover .project__name { color: var(--pc); }
.project::after { content: "↗"; position: absolute; right: 0; top: 50%; transform: translateY(-50%) scale(0); font-size: 22px; transition: transform .4s var(--ease); }
.project:hover::after { transform: translateY(-50%) scale(1); }
/* floating preview */
.project__preview { position: fixed; top: 0; left: 0; width: clamp(200px,20vw,320px); height: clamp(150px,15vw,240px); pointer-events: none; opacity: 0; z-index: 400; overflow: hidden; border-radius: 4px; transform: translate(-50%, -50%) scale(.7); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.project:hover .project__preview { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.project__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) {
  .project { grid-template-columns: 40px 1fr; grid-template-areas: "idx name" "idx cat"; row-gap: 6px; }
  .project__idx { grid-area: idx; } .project__name { grid-area: name; }
  .project__cat { grid-area: cat; } .project__year { display: none; }
  .project__preview { display: none; } .project::after { display: none; }
}

/* ---------- SERVICES ---------- */
.services { padding: clamp(60px,8vw,120px) var(--pad); }
.services__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(13,13,13,.14); border: 1px solid rgba(13,13,13,.14); }
.service { background: var(--paper); padding: clamp(28px,3.2vw,54px); display: flex; flex-direction: column; gap: 14px; transition: background .5s var(--ease), color .5s; }
.service__num { color: var(--muted); transition: color .5s; }
.service__title { font-weight: 800; font-size: clamp(28px,3vw,44px); letter-spacing: -.02em; }
.service__desc { color: #4a4642; line-height: 1.5; max-width: 44ch; transition: color .5s; }
.service__tags { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; margin-top: auto; padding-top: 20px; color: var(--muted); transition: color .5s; }
.service__tags li { position: relative; padding-left: 14px; }
.service__tags li::before { content: "✳"; position: absolute; left: 0; color: var(--rose); }
.service:hover { background: var(--ink); color: var(--paper); }
.service:hover .service__desc, .service:hover .service__num, .service:hover .service__tags { color: rgba(255,247,245,.65); }
@media (max-width: 720px) { .services__grid { grid-template-columns: 1fr; } }

/* ---------- PROCESS ---------- */
.process { padding: clamp(60px,8vw,120px) var(--pad); }
.process__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px,2vw,30px); }
.process__step { display: flex; flex-direction: column; gap: 12px; padding-top: 26px; border-top: 2px solid var(--ink); }
.process__num { font-family: var(--font-mono); font-size: 13px; color: var(--rose); }
.process__step h3 { font-weight: 800; font-size: clamp(22px,2.2vw,32px); letter-spacing: -.02em; }
.process__step p { color: #4a4642; line-height: 1.5; font-size: 15px; }
@media (max-width: 900px) { .process__steps { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .process__steps { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta { padding: clamp(90px,14vw,200px) var(--pad); text-align: center; display: flex; flex-direction: column; align-items: center; gap: clamp(24px,3vw,40px); }
.cta__label { color: var(--muted); }
.cta__title { font-weight: 800; font-size: clamp(44px, 10vw, 150px); letter-spacing: -.04em; line-height: .92; }
.cta__title .line { display: block; overflow: hidden; }
.cta__title [data-line] { display: inline-block; }
.cta__title em { font-style: italic; color: var(--rose); }
.cta__btn { position: relative; margin-top: 10px; padding: clamp(18px,2vw,26px) clamp(34px,4vw,60px); border-radius: 100px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: clamp(16px,1.6vw,22px); overflow: hidden; }
.cta__btn-inner { position: relative; z-index: 2; display: inline-block; }
.cta__btn::before { content: ""; position: absolute; inset: 0; background: var(--rose); border-radius: 50%; transform: scale(0); transform-origin: center; transition: transform .5s var(--slow); z-index: 1; }
.cta__btn:hover::before { transform: scale(2.2); }
.cta__btn:hover .cta__btn-inner { color: var(--ink); }

/* ---------- FOOTER ---------- */
.footer { background: var(--ink); color: var(--paper); padding: clamp(50px,6vw,80px) var(--pad) clamp(24px,3vw,34px); }
.footer__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; padding-bottom: clamp(40px,6vw,70px); }
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__lbl { color: rgba(255,247,245,.4); margin-bottom: 8px; }
.footer__col a, .footer__col span { font-size: clamp(16px,1.3vw,20px); width: fit-content; }
.footer__col a { position: relative; transition: color .3s; }
.footer__col a:hover { color: var(--rose); }
.footer__big { display: flex; align-items: center; justify-content: center; gap: clamp(10px,2vw,30px); border-top: 1px solid rgba(255,247,245,.15); padding: clamp(30px,5vw,60px) 0 clamp(20px,3vw,30px); }
.footer__big span { font-weight: 800; font-size: clamp(48px, 15vw, 240px); letter-spacing: -.04em; line-height: 1; }
.footer__star { width: clamp(24px,6vw,90px); fill: var(--rose); }
.footer__base { display: flex; justify-content: space-between; align-items: center; color: rgba(255,247,245,.5); border-top: 1px solid rgba(255,247,245,.15); padding-top: 22px; }
.footer__base button { transition: color .3s; }
.footer__base button:hover { color: var(--rose); }
@media (max-width: 640px) { .footer__grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- REVEAL BASELINE ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); }
[data-line] { will-change: transform; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
