/* ========================================
   ICE CODE — Custom Car Coding
   Idejno rešenje • v1.0
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Boje — dark (podrazumevano) */
  --bg-deep: #06090e;
  --bg: #0a0e14;
  --bg-soft: #11161f;
  --bg-card: #141a24;
  --border: #1f2733;
  --border-soft: #161d27;

  --ice: #00bfff;
  --ice-bright: #38d4ff;
  --ice-soft: #6ee0ff;
  --ice-glow: rgba(0, 191, 255, 0.35);
  --ice-faint: rgba(0, 191, 255, 0.08);

  --text: #e8edf2;
  --text-soft: #9aa5b1;
  --text-faint: #5a6573;

  /* Glass/nav površine */
  --glass-bg: rgba(8, 12, 18, 0.38);
  --glass-bg-strong: rgba(5, 7, 11, 1);
  --glass-card-bg: rgba(8, 12, 18, 0.5);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-shine: rgba(255, 255, 255, 0.09);
  --glass-shine-soft: rgba(255, 255, 255, 0.06);
  --glass-hairline: rgba(255, 255, 255, 0.18);
  --grid-line: rgba(255, 255, 255, 0.015);

  --shadow-1: rgba(0, 0, 0, 0.55);
  --shadow-2: rgba(0, 0, 0, 0.3);
  --shadow-3: rgba(0, 0, 0, 0.18);

  /* Logo brendova (svetlo na tamnoj podlozi) */
  --brand-logo-filter: brightness(0) invert(1);

  color-scheme: dark;

  /* Tipografija */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Sistem */
  --radius: 980px;
  --radius-lg: 16px;
  --container: 1280px;
  --transition: 0.3s cubic-bezier(0.2, 0.6, 0.2, 1);
}

:root[data-theme="light"] {
  --bg-deep: #eef2f6;
  --bg: #f6f8fa;
  --bg-soft: #eef1f5;
  --bg-card: #ffffff;
  --border: #dde3ea;
  --border-soft: #e6eaef;

  --ice: #0091c8;
  --ice-bright: #0078aa;
  --ice-soft: #00a8e0;
  --ice-glow: rgba(0, 145, 200, 0.25);
  --ice-faint: rgba(0, 145, 200, 0.08);

  --text: #10161f;
  --text-soft: #4a5563;
  --text-faint: #808b98;

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 1);
  --glass-card-bg: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(10, 20, 30, 0.08);
  --glass-shine: rgba(255, 255, 255, 0.6);
  --glass-shine-soft: rgba(255, 255, 255, 0.4);
  --glass-hairline: rgba(255, 255, 255, 0.8);
  --grid-line: rgba(10, 20, 30, 0.03);

  --shadow-1: rgba(20, 30, 45, 0.14);
  --shadow-2: rgba(20, 30, 45, 0.08);
  --shadow-3: rgba(20, 30, 45, 0.05);

  --brand-logo-filter: brightness(0) invert(0);

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Pozadinska teksturna mreža */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--ice-faint), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(0,191,255,0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main, header, footer, section {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ============ KONTEJNER ============ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ NAVIGACIJA ============ */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 48px);
  max-width: 1120px;
  border-radius: 9999px;

  /* Liquid glass */
  background: var(--glass-bg);
  backdrop-filter: blur(48px) saturate(200%) brightness(1.08);
  -webkit-backdrop-filter: blur(48px) saturate(200%) brightness(1.08);

  border: 1px solid var(--glass-border);
  box-shadow:
    0 0 0 0.5px rgba(0, 191, 255, 0.13),
    0 8px 40px var(--shadow-1),
    0 2px 8px var(--shadow-2),
    inset 0 1px 0 var(--glass-shine),
    inset 0 -1px 0 var(--shadow-3);
}

.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: linear-gradient(
    160deg,
    var(--glass-shine-soft) 0%,
    rgba(0, 191, 255, 0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.nav::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--glass-hairline),
    rgba(0, 191, 255, 0.25),
    var(--glass-hairline),
    transparent
  );
  pointer-events: none;
  z-index: 0;
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
  z-index: 1;
}

.nav-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-logo img {
  height: 21px;
  width: auto;
  filter: drop-shadow(0 0 8px var(--ice-glow));
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.02em;
  position: relative;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ice-bright);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--ice);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--ice-glow);
}

.nav-cta {
  padding: 10px 22px;
  background: var(--ice);
  color: #000;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: all var(--transition);
}

.nav-cta:hover {
  background: var(--ice-bright);
  box-shadow: 0 0 24px var(--ice-glow);
  transform: translateY(-1px);
}

/* ── Theme toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-soft);
  flex-shrink: 0;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.theme-toggle:hover {
  color: var(--ice-bright);
  background: var(--ice-faint);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }

:root[data-theme="light"] .theme-icon-sun { display: none; }
:root[data-theme="light"] .theme-icon-moon { display: block; }

.nav-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  position: relative;
}

.nav-mobile-toggle span::before,
.nav-mobile-toggle span::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--text);
  left: 0;
}

.nav-mobile-toggle span::before { top: -7px; }
.nav-mobile-toggle span::after { top: 7px; }

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 32px 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg-snowflake {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 720px);
  height: min(90vw, 720px);
  opacity: 0.18;
  filter: drop-shadow(0 0 80px var(--ice-glow));
  z-index: 0;
  animation: slowRotate 80s linear infinite;
}

@keyframes slowRotate {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--ice-faint);
  border: 1px solid rgba(0,191,255,0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ice-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--ice);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--ice);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}

.hero h1 .accent {
  background: linear-gradient(180deg, var(--ice-bright) 0%, var(--ice) 60%, rgba(0,191,255,0.4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero p {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-soft);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--ice);
  color: #001220;
  box-shadow: 0 0 0 0 var(--ice-glow);
}

.btn-primary:hover {
  background: var(--ice-bright);
  box-shadow: 0 0 32px var(--ice-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--ice);
  color: var(--ice-bright);
}

/* ============ SEKCIJE ============ */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ice);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-left: 24px;
  position: relative;
}

.section-eyebrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 1px;
  background: var(--ice);
}

.section-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ============ BRENDOVI ============ */
.brands {
  padding: 80px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.brands-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  align-items: center;
  justify-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.brand-item {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(1) brightness(0.7);
  opacity: 0.6;
  transition: all var(--transition);
  cursor: pointer;
}

.brand-item img {
  max-height: 56px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.brand-item:hover {
  filter: grayscale(0) brightness(1);
  opacity: 1;
  transform: translateY(-2px);
}

/* ============ USLUGE GRID ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.service-card {
  position: relative;
  padding: 36px 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ice-glow), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  border-color: rgba(0,191,255,0.3);
  transform: translateY(-4px);
  background: linear-gradient(180deg, var(--bg-card), rgba(0,191,255,0.03));
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ice-faint);
  border: 1px solid rgba(0,191,255,0.2);
  border-radius: var(--radius);
  color: var(--ice-bright);
  margin-bottom: 24px;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}

.service-num {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

/* ============ FOOTER ============ */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-soft);
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 8px var(--ice-glow));
}

.footer-brand h4 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-soft);
  font-size: 14px;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--ice-bright);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: all var(--transition);
}

.footer-social a:hover {
  border-color: var(--ice);
  color: var(--ice-bright);
  background: var(--ice-faint);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

/* ============ PAGE HEADER (subpages) ============ */
.page-header {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}

.page-header-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, var(--ice-faint), transparent 70%);
  pointer-events: none;
}

.page-header-content {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.page-header h1 .accent {
  color: var(--ice-bright);
}

.page-header p {
  font-size: 18px;
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-soft);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--ice);
}

.breadcrumb .sep {
  color: var(--text-faint);
}

/* ============ ANIMACIJE NA UČITAVANJE ============ */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow:
      0 0 0 0.5px rgba(0, 191, 255, 0.12),
      0 12px 40px var(--shadow-1),
      inset 0 1px 0 var(--glass-shine);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 0;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .nav-links a {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-soft);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-end .nav-cta {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }
  
  .hero {
    padding: 100px 20px 60px;
  }
  
  .section {
    padding: 64px 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-brand {
    grid-column: span 1;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    justify-content: center;
  }

  .nav-logo img {
    height: 16px;
  }
}
