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

:root {
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --bg3: #13131f;
  --card: #16162a;
  --border: #2a2a4a;
  --accent: #6c63ff;
  --accent2: #a78bfa;
  --accent3: #38bdf8;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --mono: 'Courier New', 'Consolas', 'Lucida Console', monospace;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* NAVBAR */
#navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(10,10,15,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); transition: all 0.3s; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0.75rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.nav-logo-img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; white-space: nowrap; }
.nav-links a:hover { color: var(--accent2); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.lang-toggle { background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.35); color: var(--text); padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif; white-space: nowrap; }
.lang-toggle:hover { border-color: var(--accent2); color: var(--accent2); }
.hamburger { display: none; cursor: pointer; font-size: 1.3rem; color: var(--text); }
.mobile-menu { display: none; list-style: none; flex-direction: column; padding: 1rem 2rem 1.5rem; border-top: 1px solid var(--border); }
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--text-muted); text-decoration: none; padding: 0.5rem 0; font-size: 1rem; font-family: 'Inter', sans-serif; }

/* HERO */
#hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(108,99,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(108,99,255,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.35; pointer-events: none; }
.hero-glow-1 { width: 600px; height: 600px; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); top: -100px; left: -100px; }
.hero-glow-2 { width: 500px; height: 500px; background: radial-gradient(circle, var(--accent3) 0%, transparent 70%); bottom: -80px; right: -80px; }

.hero-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 7rem 2rem 4rem; display: flex; align-items: center; gap: 4rem; width: 100%; }
.hero-content { flex: 1; min-width: 0; }
.hero-badge { display: inline-block; background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.4); color: var(--accent2); padding: 0.4rem 1rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500; margin-bottom: 1.5rem; }
#hero h1 { font-size: clamp(2rem, 4.5vw, 3.8rem); font-weight: 900; line-height: 1.15; margin-bottom: 1.2rem; }
.gradient-text { background: linear-gradient(135deg, var(--accent), var(--accent3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 1.05rem; color: var(--text-muted); max-width: 500px; margin-bottom: 2rem; line-height: 1.75; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn { padding: 0.75rem 1.8rem; border-radius: 8px; font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: all 0.25s; display: inline-flex; align-items: center; gap: 0.5rem; font-family: 'Inter', sans-serif; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent3)); color: #fff; box-shadow: 0 4px 20px rgba(108,99,255,0.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,0.5); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent2); color: var(--accent2); }
.full-width { width: 100%; text-align: center; justify-content: center; }

/* Hero visual */
.hero-visual { flex: 0 0 440px; max-width: 440px; display: flex; flex-direction: column; gap: 1.5rem; align-items: center; }
.hero-logo-wrap { position: relative; display: flex; align-items: center; justify-content: center; width: 160px; height: 160px; }
.hero-logo-glow { position: absolute; inset: -20px; background: radial-gradient(circle, rgba(108,99,255,0.45) 0%, transparent 70%); border-radius: 50%; animation: logoPulse 3s ease-in-out infinite; }
@keyframes logoPulse { 0%,100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.hero-logo-img { width: 140px; height: 140px; object-fit: contain; border-radius: 24px; position: relative; z-index: 1; filter: drop-shadow(0 0 24px rgba(108,99,255,0.6)); }

/* CODE WINDOW — always left-aligned, monospace font locked */
.code-window { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.window-bar { background: #1e1e32; padding: 0.75rem 1rem; display: flex; gap: 0.5rem; align-items: center; text-align: left; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot.red { background: var(--red); } .dot.yellow { background: var(--yellow); } .dot.green { background: var(--green); }
.window-title { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.5rem; font-family: var(--mono) !important; }
.code-content {
  padding: 1.25rem 1.5rem;
  font-size: 0.82rem;
  line-height: 1.8;
  font-family: var(--mono) !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
  /* Kljucno: uvek levo poravnanje bez obzira sta roditelj kaze */
  text-align: left !important;
  direction: ltr;
}
.code-content code {
  font-family: var(--mono) !important;
  display: block;
  text-align: left !important;
}
.code-content * { font-family: var(--mono) !important; text-align: left !important; }
.kw  { color: #c792ea; }
.cls { color: #82aaff; }
.fn  { color: #c3e88d; }

/* SECTIONS */
.section-container { max-width: 1200px; margin: 0 auto; padding: 5rem 2rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.tag { display: inline-block; background: rgba(108,99,255,0.15); border: 1px solid rgba(108,99,255,0.3); color: var(--accent2); padding: 0.3rem 0.9rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; }

/* ABOUT */
#about { background: var(--bg2); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-text p { color: var(--text-muted); margin-bottom: 1.2rem; line-height: 1.8; }
.about-text strong { color: var(--text); }
.stats-row { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 900; background: linear-gradient(135deg, var(--accent), var(--accent3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem; transition: border-color 0.2s, transform 0.2s; }
.about-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.about-card i { font-size: 1.4rem; color: var(--accent); margin-bottom: 0.6rem; }
.about-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.about-card p { font-size: 0.82rem; color: var(--text-muted); }

/* SERVICES */
#services { background: var(--bg); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; transition: all 0.3s; position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent3)); opacity: 0; transition: opacity 0.3s; }
.service-card:hover::before { opacity: 1; }
.service-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(108,99,255,0.15); }
.service-icon { font-size: 1.8rem; color: var(--accent); margin-bottom: 1rem; }
.service-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.7rem; }
.service-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }
.service-card--highlight { border-color: rgba(108,99,255,0.3); background: linear-gradient(135deg, rgba(108,99,255,0.08) 0%, rgba(56,189,248,0.05) 100%); }
.service-card--highlight::before { opacity: 1 !important; }

/* TECH */
#tech { background: var(--bg2); }
.tech-grid { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.tech-item { display: flex; align-items: center; gap: 0.6rem; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1.4rem; font-size: 0.9rem; font-weight: 600; transition: all 0.2s; white-space: nowrap; }
.tech-item:hover { border-color: var(--accent2); color: var(--accent2); transform: translateY(-2px); }
.tech-item i { font-size: 1.2rem; color: var(--accent); }

/* CONTACT */
#contact { background: var(--bg3); }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
.contact-info p { color: var(--text-muted); margin-bottom: 2rem; line-height: 1.8; }
.contact-items { display: flex; flex-direction: column; gap: 1rem; }
.contact-item { display: flex; align-items: center; gap: 0.8rem; font-size: 0.95rem; }
.contact-item i { color: var(--accent); font-size: 1.1rem; width: 20px; text-align: center; }
.contact-item a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.contact-item a:hover { color: var(--accent2); }
.contact-item span { color: var(--text-muted); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group input,
.form-group textarea {
  width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1.1rem; color: var(--text);
  font-family: 'Inter', sans-serif !important; font-size: 0.9rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(167,139,250,0.15); }
.form-group input.input-error, .form-group textarea.input-error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.field-error { font-size: 0.78rem; color: var(--red); min-height: 1rem; font-family: 'Inter', sans-serif !important; }
.form-note { font-size: 0.85rem; margin-top: 0.5rem; text-align: center; min-height: 1.2rem; font-family: 'Inter', sans-serif !important; }

/* FOOTER */
footer { background: var(--bg); border-top: 1px solid var(--border); text-align: center; padding: 3rem 2rem; }
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.footer-logo-img { width: 52px; height: 52px; object-fit: contain; border-radius: 10px; }
.footer-logo-text { font-size: 1.5rem; font-weight: 700; }
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.footer-links { margin-bottom: 1.5rem; display: flex; justify-content: center; gap: 1.2rem; }
.footer-links a { color: var(--text-muted); font-size: 1.4rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent2); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .hero-visual { flex: 0 0 380px; max-width: 380px; }
  .code-content { font-size: 0.78rem; }
  .nav-links { gap: 1.25rem; }
}

@media (max-width: 900px) {
  .hero-inner { flex-direction: column; text-align: center; padding: 6rem 2rem 3rem; gap: 2rem; }
  .hero-content { width: 100%; }
  .hero-sub { max-width: 560px; margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-visual { flex: none; width: 100%; max-width: 500px; margin: 0 auto; }
  .hero-logo-wrap { width: 110px; height: 110px; }
  .hero-logo-img { width: 90px; height: 90px; }
  /* code uvek levo poravnat bez obzira na text-align: center roditelja */
  .code-content { font-size: 0.76rem; padding: 1rem 1.2rem; line-height: 1.7; text-align: left !important; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .hero-inner { padding: 5rem 1.25rem 2.5rem; gap: 1.75rem; }
  #hero h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
  .hero-sub { font-size: 0.95rem; }
  .hero-cta .btn { flex: 1 1 140px; justify-content: center; }
  .hero-visual { max-width: 100%; }
  .hero-logo-wrap { width: 80px; height: 80px; }
  .hero-logo-img { width: 64px; height: 64px; }
  .code-window { border-radius: 8px; }
  .window-bar { padding: 0.5rem 0.75rem; }
  .dot { width: 9px; height: 9px; }
  .window-title { font-size: 0.68rem; }
  .code-content { font-size: 0.68rem; line-height: 1.65; padding: 0.85rem 1rem; text-align: left !important; }
  .services-grid { grid-template-columns: 1fr; }
  .about-cards { grid-template-columns: 1fr; }
  .stats-row { justify-content: center; gap: 1.5rem; }
  .section-container { padding: 3.5rem 1.25rem; }
  .footer-logo-img { width: 40px; height: 40px; }
  .footer-logo-text { font-size: 1.2rem; }
  .contact-wrapper { gap: 1.5rem; }
}

@media (max-width: 380px) {
  #hero h1 { font-size: 1.55rem; }
  .stat-num { font-size: 1.6rem; }
  .code-content { font-size: 0.62rem; padding: 0.75rem 0.85rem; text-align: left !important; }
}
