:root {
  /* Color Palette */
  --bg-dark: hsl(212, 70%, 14%); /* Duboka, bogata okeanska modra */
  --bg-card: hsla(212, 50%, 20%, 0.6);
  --text-main: hsl(0, 0%, 98%);
  --text-muted: hsl(212, 20%, 80%);
  
  --primary: hsl(190, 90%, 50%);
  --primary-glow: hsla(190, 90%, 50%, 0.4);
  --secondary: hsl(230, 80%, 65%);
  
  /* Glassmorphism */
  --glass-border: hsla(0, 0%, 100%, 0.12);
  --glass-bg: hsla(212, 55%, 18%, 0.5);
  --glass-shadow: 0 8px 32px 0 hsla(0, 0%, 0%, 0.4);
  
  /* Typography */
  --font-display: 'Outfit', 'Inter', 'Noto Sans', sans-serif;
  --font-body: 'Inter', 'Noto Sans', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-dark);
  background-image: radial-gradient(circle at top, hsl(212, 60%, 18%) 0%, hsl(212, 80%, 8%) 100%);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, .logo-text {
  font-family: var(--font-display);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  color: var(--primary);
  font-size: 1.5rem;
  text-shadow: 0 0 10px var(--primary-glow);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 2rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transform: scale(1.05);
  animation: subtleZoom 20s infinite alternate ease-in-out;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    hsla(220, 40%, 4%, 0.3) 0%, 
    hsla(220, 40%, 4%, 0.8) 70%, 
    var(--bg-dark) 100%);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  z-index: 1;
}

.badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: hsla(190, 90%, 50%, 0.1);
  border: 1px solid var(--primary-glow);
  border-radius: 50px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-inline: auto;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-display);
  border-radius: 50px;
  box-shadow: 0 0 20px var(--primary-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--primary-glow);
}

/* Sections */
.section {
  padding: 6rem 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-inline: auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-glow);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 2rem 2rem 6rem;
}

.cta-card {
  background: linear-gradient(135deg, hsla(190, 90%, 50%, 0.1), hsla(230, 80%, 65%, 0.05));
  border: 1px solid var(--primary-glow);
  padding: 4rem 2rem;
}

.cta-card h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-card p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Footer */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Animations */
@keyframes subtleZoom {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.15); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

/* Navigation links */
.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link.active {
  color: var(--text-main);
}

/* Figures (map renders) */
.figure {
  margin: 0 0 4rem;
  text-align: center;
}

.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.figure figcaption {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.75rem;
  font-style: italic;
  max-width: 900px;
  margin-inline: auto;
}

.legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid hsla(0, 0%, 100%, 0.2);
  display: inline-block;
}

/* Stat tiles */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.5rem;
}

.stat {
  padding: 1.75rem 1.25rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary-glow);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Data tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.data-table th {
  padding: 1rem;
  color: var(--primary);
  border-bottom: 1px solid var(--glass-border);
}

.data-table td {
  padding: 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  vertical-align: top;
}

.data-table td:first-child {
  color: var(--text-main);
  font-weight: 500;
}

.data-table tbody tr:nth-child(odd) {
  background: hsla(0, 0%, 100%, 0.02);
}

.table-wrap {
  overflow-x: auto;
}

/* Pipeline steps */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.steps li {
  counter-increment: step;
  padding: 1.75rem;
  position: relative;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--primary);
  opacity: 0.9;
  display: block;
  margin-bottom: 0.5rem;
}

.steps h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.steps p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Callout */
.callout {
  background: hsla(0, 0%, 100%, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

.callout p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.callout p + p {
  margin-top: 0.5rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0.75rem 1rem;
  }
  .nav-link {
    font-size: 0.8rem;
    white-space: nowrap;
  }
  /* Six links do not fit beside the logo on a phone; wrapped, they grew the
     fixed bar over the page title. One scrolling row under the logo instead,
     language first so it never scrolls out of sight. */
  .nav-container {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  .nav-links {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 1.1rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links .lang-switch {
    order: -1;
    flex: none;
  }
  .section {
    padding: 4rem 1rem;
  }
  .glass-card {
    padding: 1.75rem;
  }
}

/* Language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lang-switch select {
  background: hsla(0, 0%, 100%, 0.06);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.25rem 0.4rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
}

.lang-switch select:focus {
  outline: none;
  border-color: var(--primary-glow);
}

.lang-switch option {
  background: hsl(212, 60%, 14%);
  color: var(--text-main);
}

/* Right-to-left languages */
[dir="rtl"] .nav-links {
  justify-content: flex-start;
}

[dir="rtl"] .data-table,
[dir="rtl"] .callout {
  text-align: right;
}

[dir="rtl"] .callout {
  border-left: none;
  border-right: 4px solid var(--primary);
}

/* Contact form */
.cta-link {
  display: inline-block;
  margin-left: 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.cta-link:hover {
  color: var(--text-main);
  border-color: var(--primary-glow);
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-form label em {
  font-style: normal;
  opacity: 0.7;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: hsla(0, 0%, 100%, 0.06);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.contact-form select option {
  background: hsl(212, 60%, 14%);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form .hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}

.contact-form .cta-button {
  justify-self: start;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.8rem 2rem;
}

.contact-form .cta-button[disabled] {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.form-status {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: hsla(190, 90%, 50%, 0.1);
  border: 1px solid var(--primary-glow);
  color: var(--text-main);
}

.form-status[data-status="invalid"],
.form-status[data-status="error"] {
  background: hsla(5, 70%, 50%, 0.12);
  border-color: hsla(5, 70%, 60%, 0.5);
}

/* Cookie banner (main.js): Google Analytics loads only after "Accept". */
.cookie-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 28rem;
  margin-left: auto;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  font-size: 0.9rem;
}
.cookie-consent p { margin: 0 0 0.75rem; color: var(--text-muted); }
.cookie-actions { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }
.cookie-button {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
}
.cookie-accept { background: var(--primary); border-color: var(--primary); color: var(--bg-dark); font-weight: 600; }
