/* ============================================================
   OVDJE MIJENJAŠ BOJE
   --bg      pozadina
   --fg      glavni tekst, logo, veliko "f." i staklo
   --muted   sporedni tekst (Instagram, footer)
   --c1 do --c4  boje svjetla koje se prelama u pozadini
                 (idu i u dugin rub staklenog dugmeta)
   --shadow  sjenka ispod staklenog dugmeta
   ============================================================ */
:root {
  --bg: #07070c;
  --fg: #f4f2ee;
  --muted: #9a98a6;
  --c1: #3d5cff; /* plava */
  --c2: #8c3dff; /* ljubičasta */
  --c3: #ff4d8d; /* roza */
  --c4: #ffae42; /* narandžasta */
  --shadow: #000000;

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-liquid: cubic-bezier(0.2, 1.5, 0.35, 1);
  --side: clamp(24px, 8vw, 140px);
}

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 400 500;
  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: "Geist";
  src: url("/assets/fonts/geist-latin-ext.woff2") format("woff2");
  font-weight: 400 500;
  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;
}

@property --a {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* ---------- Pozadina: svjetlo, veliko "f." i tekstura ---------- */

/* Svjetlo koje se prelama. Bez JS-a ostaje ovaj mirni gradijent. */
.light {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background:
    radial-gradient(55vmax 40vmax at 22% 28%, color-mix(in srgb, var(--c1) 30%, transparent), transparent 70%),
    radial-gradient(40vmax 35vmax at 82% 42%, color-mix(in srgb, var(--c3) 26%, transparent), transparent 70%),
    radial-gradient(50vmax 30vmax at 50% 100%, color-mix(in srgb, var(--c2) 26%, transparent), transparent 70%);
  animation: fade 1.6s ease-out backwards;
}

.live .light {
  background: none;
}

/* Veliko "f." van fokusa */
.mark {
  --px: 0px;
  --py: 0px;
  position: fixed;
  top: 50%;
  right: 5vw;
  z-index: -2;
  height: 94vh;
  aspect-ratio: 320 / 600;
  color: var(--fg);
  pointer-events: none;
  translate: var(--px) calc(-50% + var(--py));
  animation: markIn 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.mark-in {
  position: relative;
  width: 100%;
  height: 100%;
  animation: float 18s ease-in-out infinite alternate;
}

.mark svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mark .soft {
  filter: blur(clamp(10px, 1.6vw, 24px));
  opacity: 0.6;
}

/* Prelamanje boja na ivicama slova */
.mark .fr {
  color: var(--c3);
  translate: -2.2% 0.6%;
  filter: blur(clamp(8px, 1.3vw, 18px));
  opacity: 0.75;
}

.mark .fb {
  color: var(--c1);
  translate: 2.2% -0.6%;
  filter: blur(clamp(8px, 1.3vw, 18px));
  opacity: 0.85;
}

.mark .sharp {
  opacity: 0.86;
  -webkit-mask-image: linear-gradient(200deg, transparent 38%, #000 82%);
  mask-image: linear-gradient(200deg, transparent 38%, #000 82%);
}

/* Fino zrno i tačkice (crta ih script.js) */
.tex {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: fade 1.6s ease-out 0.3s backwards;
}

@keyframes markIn {
  from {
    opacity: 0;
    scale: 1.06;
  }
}

@keyframes float {
  from { transform: translateY(-1.5%) rotate(-1deg); }
  to { transform: translateY(1.5%) rotate(1.2deg); }
}

@keyframes fade {
  from { opacity: 0; }
}

/* ---------- Sadržaj ---------- */

.stage {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 40px var(--side) 28px;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 640px;
}

.logo {
  width: clamp(190px, 34vw, 500px);
  margin: 0;
  line-height: 0;
}

.logo svg {
  display: block;
  width: 100%;
  height: auto;
}

.line {
  max-width: 22ch;
  margin: clamp(22px, 3vw, 36px) 0 0;
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ig {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0 -10px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.ig svg {
  width: 16px;
  height: 16px;
}

.ig:hover {
  color: var(--fg);
}

.foot {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
  border-radius: 999px;
}

/* ---------- Stakleno dugme (liquid glass) ---------- */

.glass {
  --mx: 50%;
  --my: 0%;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-top: clamp(28px, 3.6vw, 44px);
  padding: 0.8em 1.35em 0.8em 1.5em;
  border-radius: 999px;
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  text-decoration: none;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--fg) 13%, transparent),
    color-mix(in srgb, var(--fg) 4%, transparent)
  );
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow:
    inset 0 1px 1px color-mix(in srgb, var(--fg) 40%, transparent),
    inset 0 -10px 18px -10px color-mix(in srgb, var(--fg) 16%, transparent),
    0 18px 40px -18px color-mix(in srgb, var(--shadow) 80%, transparent);
  transition: transform 0.6s var(--ease-liquid);
}

/* Dugin rub stakla (vrti se dok je miš na dugmetu) */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--fg) 55%, transparent), transparent 55%),
    conic-gradient(from var(--a), var(--c1), var(--c2), var(--c3), var(--c4), var(--c1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.85;
  pointer-events: none;
}

/* Odsjaj koji prati miš ili prst */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    120px circle at var(--mx) var(--my),
    color-mix(in srgb, var(--fg) 24%, transparent),
    transparent 70%
  );
  opacity: 0.45;
  transition: opacity 0.3s;
  pointer-events: none;
}

.glass svg {
  width: 0.8em;
  height: 0.8em;
  transition: transform 0.6s var(--ease-liquid);
}

@media (hover: hover) {
  .glass:hover {
    transform: scale(1.04);
  }

  .glass:hover::after {
    opacity: 1;
  }

  .glass:hover::before {
    animation: spin 2.4s linear infinite;
  }

  .glass:hover svg {
    transform: translate(2px, -2px);
  }
}

.glass:active {
  transform: scale(0.97);
  transition-duration: 0.15s;
}

@keyframes spin {
  to { --a: 360deg; }
}

/* ---------- Ulaz pri učitavanju ---------- */

.logo,
.line,
.glass,
.ig {
  animation: rise 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.logo {
  animation-name: focus;
  animation-duration: 1.2s;
}

.line { animation-delay: 0.15s; }
.glass { animation-delay: 0.3s; }
.ig { animation-delay: 0.4s; }

@keyframes focus {
  from {
    filter: blur(12px);
    opacity: 0;
    transform: scale(0.98);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ---------- Mobitel: veliko "f." gore, tekst dolje ---------- */

@media (max-width: 820px), (orientation: portrait) {
  .mark {
    top: -4svh;
    right: -10vw;
    height: 50svh;
    translate: var(--px) var(--py);
  }

  .hero {
    justify-content: flex-end;
    padding-bottom: 6svh;
  }

  .logo {
    width: clamp(180px, 56vw, 400px);
  }
}

/* ---------- Smanjeno kretanje: sve statično ---------- */

@media (prefers-reduced-motion: reduce) {
  .light,
  .mark,
  .mark-in,
  .tex,
  .logo,
  .line,
  .glass,
  .glass:hover::before,
  .ig {
    animation: none;
  }

  .glass,
  .glass svg {
    transition: none;
  }
}

/* Tekst samo za čitače ekrana */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
