/* =========================
   THEME VARIABLES (ONE PLACE)
========================= */
:root {
  /* Core background */
  --color-bg: #050b1a;
  --color-text: #ffffff;

  /* Glass surfaces */
  --glass-weak: rgba(255, 255, 255, 0.05);
  --glass-medium: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.12);

  /* Borders */
  --border-weak: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);

  /* Text */
  --text-muted: rgba(255, 255, 255, 0.9);

  /* Accent (futuristic blue) */
  --accent-primary: rgba(120, 175, 255, 0.25);
  --accent-glow: rgba(120, 175, 255, 0.45);

  /* Overlays */
  --overlay-soft: rgba(5, 11, 26, 0.1);
  --overlay-medium: rgba(5, 11, 26, 0.6);
  --overlay-strong: rgba(5, 11, 26, 0.9);

  /* Fonts */
  --font-body: "Inter", system-ui, sans-serif;
  --font-heading: "Space Grotesk", system-ui, sans-serif;

  /* Header padding */
  --header-padding-y: 16px;

/* Shadow */
  --nav-hover-shadow: 0 6px 20px rgba(120, 175, 255, 0.25);

  /* Logo */
   --logo-ring-bg: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.02)
  );

  --logo-ring-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --logo-hover-scale: 1.02;
  --logo-hover-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);

  --fog-color: rgba(120, 175, 255, 0.12);
--fog-color-soft: rgba(120, 175, 255, 0.06);

/* works config */
    --ui-border-soft: rgba(255, 255, 255, 0.08);
    --ui-border-accent: rgba(120, 175, 255, 0.18);
    --ui-shadow-deep: 0 60px 120px rgba(0, 0, 0, 0.6);
    --ui-surface-alpha: 0.94;

}

/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  overflow: hidden;
  font-family: var(--font-body);
}

h1, h2, h3, .heading {
  font-family: var(--font-heading);
  font-weight: 700;
}

/* =========================
   CANVAS
========================= */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
   pointer-events: none;
}

/* =========================
   HEADER
========================= */
.header {
  position: fixed;
  top: 16px;              /* KLJUČNA LINIJA */
  left: 0;
  right: 0;
  pointer-events: auto;

  padding: var(--header-padding-y) 28px;
  z-index: 10;
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* =========================
   LOGO
========================= */
.logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;

  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;  

  background: var(--logo-ring-bg);
  box-shadow: var(--logo-ring-shadow);


  border: 1.5px solid rgba(255, 255, 255, 0.85);
  appearance: none;
  -webkit-appearance: none;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* slovo Z */
.logo-letter {
  font-size: 30px;   
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
  font-family: var(--font-heading);

  color: var(--color-text);

  /* suptilan premium glow – ništa agresivno */
  text-shadow:
    0 0 12px var(--accent-primary);
}

/* hover – vrlo suptilno */
.logo:hover {
  transform: scale(var(--logo-hover-scale));
  background: var(--glass-strong);
  box-shadow: var(--logo-hover-shadow);
}

.logo:focus-visible {
  outline: none;
}


/* =========================
   NAV
========================= */
.nav {
  display: flex;
  gap: 12px;
}

.nav-btn {
  /* background: var(--glass-weak);
  border: 1px solid var(--border-weak); */
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);

  color: var(--text-muted);

  padding: 8px 18px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;

  cursor: pointer;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    transform 0.25s ease,
    box-shadow 0.35s ease,
    color 0.35s ease;
}

.nav-btn:hover {
  background: var(--glass-strong);
  border-color: var(--border-medium);
  color: var(--color-text);
  transform: translateY(-1px);
  /* box-shadow: 0 0 16px var(--accent-primary); */
  box-shadow: var(--nav-hover-shadow);
}

.nav-btn:active {
  transform: translateY(0);
}

.nav-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.nav-btn.is-active {
  background: var(--glass-strong);
  border-color: var(--border-medium);
  color: var(--color-text);
  box-shadow: var(--nav-hover-shadow);
}

/* =========================
   STAGE (SINGLE SCENE)
========================= */

.stage {
  position: relative;
  z-index: 3;
  height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 6vh;
  pointer-events: none;
}

.stage-view {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  opacity: 0;
  pointer-events: none;

  transition:
    opacity 0.4s ease,
    filter 0.4s ease;
  filter: blur(12px);
}

.stage-view.is-active {
  opacity: 1;
  pointer-events: auto;
  filter: blur(0);
}

.stage-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* reuse hero typography */
.stage-tag {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.55;
}

.stage-title {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  font-family: var(--font-heading);
  font-weight: 700;
}

.stage-text {
  font-size: 18px;
  line-height: 1.7;
  opacity: 0.85;
  max-width: 560px;
  margin: 0 auto;
}

/* temporary */
.works-placeholder {
  margin-top: 32px;
  opacity: 0.35;
  font-size: 14px;
}

/* Used during work switch */
.works-image.is-switching {
  opacity: 0;
  transition: opacity 0.2s ease;
  
}


/* =========================
   HERO
========================= */
/* .hero {
  position: relative;
  z-index: 3;
  height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 6vh;
}

.hero-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 20px;

  animation:
    heroReveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    heroFloat 18s ease-in-out infinite;

  animation-delay: 0s, 1.2s;
} */

/* brand – tiho */
.hero-brand {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* glavni hero naslov */
.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 700;
}

/* podnaslov */
.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  opacity: 0.85;
   max-width: 560px; 
    margin: 0 auto;
}


/* =========================
   GLOBAL OVERLAY, ZA MREZU
========================= */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background: radial-gradient(
    ellipse at center,
    var(--overlay-soft) 0%,
    rgba(5, 11, 26, 0.45) 70%,
    rgba(5, 11, 26, 0.75) 100%
  );
}


/* =========================
   ANIMATIONS
========================= */
@keyframes reveal {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}


@keyframes heroReveal {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* =========================
   COSMIC / ELECTRIC FOG
========================= */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 1;
  pointer-events: none;

  background:
    /* donja gusta magla */
    radial-gradient(
      900px 420px at 50% 105%,
      rgba(120, 175, 255, 0.22),
      transparent 70%
    ),

    /* lijevi donji svemirski oblak */
    radial-gradient(
      520px 520px at 12% 88%,
      rgba(120, 175, 255, 0.14),
      transparent 72%
    ),

    /* desni gornji – vrlo suptilno */
    radial-gradient(
      420px 420px at 88% 12%,
      rgba(120, 175, 255, 0.10),
      transparent 75%
    );

  filter: blur(60px) saturate(110%);
  opacity: 0.9;

  animation: cosmicDrift 26s ease-in-out infinite alternate;
}

@keyframes cosmicDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-24px, 18px) scale(1.06);
  }
}

.works {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
}

/* --- VISUAL WRAPPER --- */
.works-visual {
  perspective: 1200px;
}

/* --- SCREEN IMAGE --- */
.works-image {
  max-width: 820px;
  width: 100%;
  border-radius: 16px;
  opacity: var(--ui-surface-alpha);
  cursor: pointer;

  /* 3D feel */
  transform: rotateY(-4deg) rotateX(1.5deg) translateZ(14px);
  transform-style: preserve-3d;

  /* light & shadow */
  box-shadow:
    var(--ui-shadow-deep),
    0 0 0 1px var(--ui-border-soft);

  border: 1px solid var(--ui-border-accent);

  transition: transform 0.6s ease;
}

/* --- PROJECT META --- */
.works-meta {
  text-align: center;
}

.works-name {
  font-size: 1.4rem;
  font-weight: 600;
}

.works-desc {
  font-size: 0.95rem;
  opacity: 0.7;
}

/* --- NAVIGATION --- */
.works-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.9rem;
  opacity: 0.75;
}

.works-nav-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
}

.works-nav-btn:hover {
  opacity: 1;
}

/* =========================
   CONTACT LINKS (KISS)
========================= */

.contact-links {
  margin-top: 28px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;

  font-size: 15px;
  letter-spacing: 0.01em;
}

.contact-link {
  color: var(--text-muted);
  text-decoration: none;

  transition:
    color 0.25s ease,
    text-shadow 0.25s ease;
}

.contact-link:hover {
  color: var(--color-text);
  text-shadow: 0 0 12px var(--accent-primary);
}

.contact-separator {
  opacity: 0.35;
}



/* =========================
   MEDIA QUERIES
========================= */

@media (max-width: 1024px) {
  .nav {
    gap: 8px;
  }

  .nav-btn {
    padding: 6px 14px;
    font-size: 13px;
  }
}


/* ======================================================
   FAZA 1 · KORAK 1
   Mobile spacing & stage hierarchy (2026)
====================================================== */

@media (max-width: 640px) {

  /* Stage – prirodnije pozicioniranje na mobile */
  .stage {
    padding-top: 14vh;      /* bilo 6vh – sad diše */
    padding-bottom: 10vh;
  }

  /* Content – više editorial osjećaja */
  .stage-content {
    max-width: 92%;
    gap: 26px;              /* više zraka između elemenata */
  }

  /* Tag – ostaje tih, ali čitljiviji */
  .stage-tag {
    font-size: 11px;
    letter-spacing: 0.32em;
    opacity: 0.6;
  }

  /* Naslov – mobile tuned, ne desktop hero */
  .stage-title {
    font-size: clamp(30px, 8vw, 42px);
    line-height: 1.12;
  }

  /* Tekst – lakše čitanje */
  .stage-text {
    font-size: 16px;
    line-height: 1.75;
    max-width: 94%;
  }

   /* Ograniči works vizual na istu osu kao header */
  .works-visual {
    width: 100%;
    max-width: 92%;
    margin: 0 auto;
  }

  /* Image poštuje kontejner */
  .works-image {
    max-width: 100%;
    transform: none; /* uklanja desktop 3D feel na mobile */
  }

  /* Header – tiši, lakši */
  .header {
    padding: 10px 14px;
    top: 8px;
  }

  /* Unutrašnji layout – bez širenja */
  .header-inner {
    max-width: 92%;
  }

  /* Logo – još mrvicu lakši */
  .logo {
    width: 44px;
    height: 44px;
    border-width: 1.2px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  }

  .logo-letter {
    font-size: 24px;
    text-shadow: 0 0 10px var(--accent-primary);
  }

}

/* ======================================================
   FAZA 1 · KORAK 1.1
   Ultra-small screens polish (≤360px)
====================================================== */

@media (max-width: 360px) {
    
  /* Više zraka ispod headera */
  .stage {
    padding-top: 16vh;
    padding-bottom: 12vh;
  }

  /* Naslov – još mrvicu smireniji */
  .stage-title {
    font-size: clamp(28px, 8.5vw, 38px);
    line-height: 1.14;
  }

  /* Tekst – malo uži za lakše čitanje */
  .stage-text {
    max-width: 90%;
  }

  /* Works – mekši prelaz u vizual */
  /* .works {
    margin-top: 3.5rem;
  } */

 .works-visual {
    max-width: 88%;
  }
   .header {
    padding: 8px 12px;
    top: 6px;
  }

  .logo {
    width: 42px;
    height: 42px;
  }

}

/* =========================================
   iPhone SE · Works scroll header safe-zone
========================================= */

@media (max-width: 375px) {

  .stage-view[data-view="works"] {
    position: absolute;
    inset: 0;

    /* nema scrolla – fit u screen */
    overflow: hidden;
  }

  /* 🔑 FIZIČKI BUFFER ISPOD HEADERA */
  .stage-view[data-view="works"]::before {
    content: "";
    display: block;
    height: 72px; /* ⬅️ SMANJENO sa 88px */
  }

  /* ⬇️ KLJUČNA STVAR: POVUCI WORKS BLOK MALO GORE */
  .stage-view[data-view="works"] .works {
    margin-top: 2.2rem; /* ⬅️ fino balansirano za SE */
  }

  /* Header ostaje iznad svega */
  .header {
    position: fixed;
    top: 8px;
    z-index: 30;
  }
}



