/* ===================== TOKENS ===================== */
:root {
  --c-bg: #08090b;
  --c-bg-alt: #0f1114;
  --c-surface: #15181c;
  --c-text: #f3f5f7;
  --c-muted: #8b93a0;
  --c-border: rgba(255,255,255,0.08);

  --c-slate: #5b6b7c;
  --c-green: #8bc53f;
  --c-red: #ed1d24;
  --c-orange: #fbb03b;
  --c-cyan: #29abe2;

  --gradient-accent: linear-gradient(90deg, var(--c-green), var(--c-cyan) 40%, var(--c-orange) 70%, var(--c-red));

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  --container: 1240px;
  --edge: clamp(24px, 5vw, 80px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
em { font-style: normal; }
img { max-width: 100%; display: block; }

::selection { background: var(--c-cyan); color: #000; }

/* subtle grain overlay for premium texture */
.noise-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* premium dark atmosphere: soft, low-opacity brand-color glow drifting behind the whole page,
   plus a vignette that darkens the edges so content stays the focal point (immersive-g.com style) */
.webgl-bg {
  position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; pointer-events: none;
}
@media (max-width: 700px) { .webgl-bg { display: none; } }

.bg-aurora {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
/* once the WebGL scene boots, it replaces the flat CSS blobs so we don't double them up */
body.webgl-active .bg-aurora { display: none; }
@media (prefers-reduced-motion: reduce) {
  .bg-aurora span { animation: none; }
}
.bg-aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  mix-blend-mode: screen;
  opacity: 0.16;
  animation: auroraDrift 30s ease-in-out infinite;
}
.bg-aurora span:nth-child(1) { width: 620px; height: 620px; background: var(--c-cyan); top: -220px; left: 6%; }
.bg-aurora span:nth-child(2) { width: 520px; height: 520px; background: var(--c-green); bottom: -200px; right: 4%; animation-delay: -10s; }
.bg-aurora span:nth-child(3) { width: 440px; height: 440px; background: var(--c-orange); top: 45%; left: 60%; opacity: 0.1; animation-delay: -20s; }
@keyframes auroraDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.12); }
}

.bg-vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 35%, rgba(4,5,6,0.65) 100%);
}

.site-header, main, .site-footer { position: relative; z-index: 2; }

/* custom cursor (desktop only) */
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 10px; height: 10px;
  border-radius: 50%; background: var(--c-cyan);
  pointer-events: none; z-index: 9999; transform: translate(-50%,-50%);
  transition: width .25s ease, height .25s ease, background .25s ease, opacity .25s ease;
  opacity: 0;
}
.cursor-dot.active { opacity: 1; }
.cursor-dot.hover { width: 34px; height: 34px; background: rgba(41,171,226,0.25); border: 1px solid var(--c-cyan); }
@media (hover: none) { .cursor-dot { display: none; } }

/* ===================== LAYOUT HELPERS ===================== */
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--gradient-accent);
  vertical-align: middle;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
  margin: 0;
  max-width: 18ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 30px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .3s ease, background .3s ease, border-color .3s ease, color .3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--c-text);
  color: #08090b;
}
.btn-primary:hover { background: var(--c-cyan); }
.btn-ghost {
  border-color: var(--c-border);
  color: var(--c-text);
  padding: 11px 22px;
  font-size: 14px;
}
.btn-ghost:hover { border-color: var(--c-cyan); color: var(--c-cyan); }
.btn-text {
  padding: 16px 6px;
  color: var(--c-muted);
}
.btn-text:hover { color: var(--c-text); }
.btn-lg { padding: 20px 40px; font-size: 17px; }

/* reveal animations (driven by JS toggling .is-visible) */
.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }
.reveal-line { display: block; overflow: hidden; }
.reveal-inner { display: block; transform: translateY(110%); transition: transform .9s cubic-bezier(.16,1,.3,1); }
.reveal-inner.is-visible { transform: translateY(0); }

/* ===================== HEADER ===================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 20px var(--edge);
  display: flex;
  transition: background .4s ease, border-color .4s ease, padding .4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8,9,11,0.75);
  backdrop-filter: blur(14px);
  border-color: var(--c-border);
  padding-top: 14px; padding-bottom: 14px;
}
.header-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { height: 46px; width: auto; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--c-text);
}
.logo-s { color: var(--c-cyan); }

.main-nav { display: flex; gap: 36px; }
.main-nav a {
  font-size: 14px;
  color: var(--c-muted);
  position: relative;
  transition: color .3s ease;
}
.main-nav a:hover { color: var(--c-text); }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--gradient-accent); transition: width .3s ease;
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.lang-toggle {
  background: none; border: 1px solid var(--c-border); border-radius: 100px;
  color: var(--c-muted); font-family: var(--font-display); font-size: 12px;
  padding: 7px 12px; cursor: pointer; letter-spacing: .05em;
  display: flex; gap: 4px;
}
.lang-toggle span[data-val] { padding: 1px 3px; transition: color .25s ease; }
.lang-toggle.lang-en span[data-val="en"],
.lang-toggle.lang-sr span[data-val="sr"] { color: var(--c-text); font-weight: 600; }
.lang-sep { opacity: .4; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 30px; height: 24px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { width: 100%; height: 1.5px; background: var(--c-text); transition: transform .3s ease, opacity .3s ease; }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px var(--edge) 80px;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; max-width: 980px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 7vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}
.hero-title em {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--c-muted);
  max-width: 56ch;
  margin: 0 0 40px;
}
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 36px; left: var(--edge);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--c-muted); z-index: 1;
}
.scroll-cue i {
  display: block; width: 1px; height: 40px; background: var(--c-border);
  position: relative; overflow: hidden;
}
.scroll-cue i::after {
  content: ""; position: absolute; top: -40px; left: 0; width: 100%; height: 40px;
  background: var(--gradient-accent); animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine { 0% { top: -40px; } 100% { top: 40px; } }

/* ===================== MARQUEE ===================== */
.marquee-section {
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
  padding: 26px 0;
  background: var(--c-bg-alt);
}
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: 20px; padding-right: 20px; white-space: nowrap; }
.marquee-group span:not(.dot) {
  font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 28px);
  color: var(--c-muted);
}
.marquee-group .dot { color: var(--c-cyan); font-size: 14px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-section:hover .marquee-track { animation-play-state: paused; }

/* ===================== SERVICES ===================== */
.services { padding: 140px var(--edge); max-width: var(--container); margin: 0 auto; }
.section-head { margin-bottom: 64px; }

.services-list { border-top: 1px solid var(--c-border); }
.service-row {
  display: grid;
  grid-template-columns: 80px 1fr 1.4fr;
  align-items: center;
  gap: 32px;
  padding: 34px 0;
  border-bottom: 1px solid var(--c-border);
  position: relative;
  transition: padding-left .4s ease;
}
.service-row::before {
  content: ""; position: absolute; left: -24px; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform: scaleY(0); transform-origin: bottom;
  transition: transform .4s ease;
}
.service-row:hover { padding-left: 12px; }
.service-row:hover::before { transform: scaleY(1); }
.service-num {
  font-family: var(--font-display); font-size: 14px; color: var(--c-muted);
}
.service-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(20px, 2.4vw, 28px); margin: 0;
  transition: color .3s ease;
}
.service-row:hover .service-title { color: var(--accent); }
.service-desc { color: var(--c-muted); margin: 0; max-width: 52ch; font-size: 15px; }

@media (max-width: 800px) {
  .service-row { grid-template-columns: 1fr; gap: 10px; }
  .service-num { order: -1; }
}

/* ===================== ABOUT ===================== */
.about { padding: 100px var(--edge) 140px; background: var(--c-bg-alt); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.about-inner { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.about-head .section-title { max-width: 14ch; }
.about-text { font-size: clamp(17px, 1.8vw, 21px); color: var(--c-text); margin: 0 0 32px; }
.about-tags { display: flex; flex-direction: column; gap: 14px; }
.about-tags li {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 14px; color: var(--c-muted);
}
.about-tags li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gradient-accent); flex-shrink: 0;
}
@media (max-width: 850px) {
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ===================== WORK ===================== */
.work { padding: 140px var(--edge); max-width: var(--container); margin: 0 auto; text-align: center; position: relative; }
.work-inner { max-width: 720px; margin: 0 auto; }
.work .section-title { max-width: none; margin: 0 auto 20px; }
.work-text { color: var(--c-muted); font-size: 17px; margin: 0 0 36px; }
.work-card-strip {
  display: flex; justify-content: center; gap: 24px; margin-top: 80px; opacity: .5;
}
.ghost-card {
  width: 160px; height: 200px; border-radius: 16px;
  border: 1px dashed var(--c-border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); color: var(--c-muted); font-size: 14px;
}
@media (max-width: 700px) { .work-card-strip { display: none; } }

/* ===================== CTA / CONTACT ===================== */
.cta {
  padding: 160px var(--edge);
  text-align: center;
  position: relative;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(41,171,226,0.12), transparent 70%);
}
.cta-inner { max-width: 780px; margin: 0 auto; }
.cta-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(32px, 5.5vw, 64px); line-height: 1.1; margin: 0 0 20px;
}
.cta-subtitle { color: var(--c-muted); font-size: 17px; margin: 0 0 40px; }

/* ===================== FOOTER ===================== */
.site-footer { border-top: 1px solid var(--c-border); padding: 80px var(--edge) 30px; }
.footer-inner {
  max-width: var(--container); margin: 0 auto 60px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
}
.footer-tagline { color: var(--c-muted); font-size: 14px; margin: 16px 0 0; max-width: 32ch; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  font-family: var(--font-display); font-size: 13px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--c-muted); margin: 0 0 6px; font-weight: 500;
}
.footer-col a, .footer-col span { color: var(--c-text); font-size: 14px; opacity: .85; transition: opacity .3s ease; }
.footer-col a:hover { opacity: 1; color: var(--c-cyan); }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-bottom {
  max-width: var(--container); margin: 0 auto; padding-top: 24px;
  border-top: 1px solid var(--c-border);
  font-size: 13px; color: var(--c-muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ===================== MOBILE NAV ===================== */
@media (max-width: 900px) {
  .main-nav {
    position: fixed; inset: 0; top: 0;
    background: var(--c-bg);
    flex-direction: column; justify-content: center; align-items: center;
    gap: 32px;
    transform: translateY(-100%);
    transition: transform .5s cubic-bezier(.76,0,.24,1);
    z-index: 400;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { font-size: 24px; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; z-index: 600; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}
