/*
 * VexaDoc — Base / Reset / Global styles
 * Importuj ZAWSZE po variables.css
 */

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
button {
  font-family: var(--font-ui);
  cursor: pointer;
}
input,
textarea,
select {
  font-family: var(--font-ui);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg2);
}
::-webkit-scrollbar-thumb {
  background: var(--border3);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}

/* ── Grid background ── */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(41, 196, 224, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 196, 224, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridPan 12s linear infinite;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 65% 45% at 10% 0%,
      rgba(26, 127, 168, 0.08) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 35% at 90% 95%,
      rgba(41, 196, 224, 0.05) 0%,
      transparent 60%
    );
}

/* ── Scroll progress bar ── */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent-grad-h);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(41, 196, 224, 0.7);
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}
@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}
@keyframes gridPan {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 48px 48px;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  from {
    background-position: -200% center;
  }
  to {
    background-position: 200% center;
  }
}
@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(41, 196, 224, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(41, 196, 224, 0);
  }
}
@keyframes badgeRing {
  0% {
    box-shadow: 0 0 0 0 rgba(41, 196, 224, 0.35);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(41, 196, 224, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(41, 196, 224, 0);
  }
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ── Logo / Brand text ── */
.logo {
  font-family: var(--font-brand);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.logo > span {
  color: var(--text);
}
.logo span span {
  color: var(--cyan);
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Utility: gradient text ── */
.grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Spinner ── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 0.75rem 1.25rem;
  font-size: var(--text-base);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  border-color: rgba(34, 197, 94, 0.35);
}
.toast.error {
  border-color: rgba(248, 81, 73, 0.35);
}

/* ── Section commons ── */
.section {
  padding: var(--space-24) var(--space-6);
  position: relative;
  z-index: 1;
}
.section-alt {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-inner-sm {
  max-width: 860px;
  margin: 0 auto;
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-light);
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: var(--text-md);
  color: var(--text2);
  line-height: 1.7;
  max-width: 600px;
}
.section-header {
  margin-bottom: 3.5rem;
}
.section-header.center {
  text-align: center;
}
.section-header.center .section-sub {
  margin: 0 auto;
}

/* ── Responsive helpers ── */
@media (max-width: 900px) {
  .section {
    padding: var(--space-16) var(--space-5);
  }
}
@media (max-width: 768px) {
  .section {
    padding: var(--space-12) var(--space-5);
  }
}
