*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background-color: #0d0b21;
  color: #e8e4ff;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: "Syne", system-ui, sans-serif;
}

.mesh-bg {
  position: fixed;
  inset: -40%;
  width: 180%;
  height: 180%;
  background-image:
    radial-gradient(at 12% 15%, rgba(100, 54, 198, 0.45) 0px, transparent 50%),
    radial-gradient(at 85% 8%, rgba(63, 96, 228, 0.3) 0px, transparent 50%),
    radial-gradient(at 45% 85%, rgba(46, 25, 94, 0.5) 0px, transparent 55%),
    radial-gradient(at 88% 88%, rgba(18, 18, 18, 0.9) 0px, transparent 50%);
  filter: blur(50px);
  animation: meshDrift 12s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes meshDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 4%) scale(1.06) rotate(1.5deg); }
}

.navbar-glass {
  background: rgba(13, 11, 33, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar-glass.scrolled {
  background: rgba(13, 11, 33, 0.88);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
  color: rgba(232, 228, 255, 0.6);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
  text-decoration: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: #6436c6;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover { color: #e8e4ff; }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: #e8e4ff; }
.nav-link.active::after { transform: scaleX(1); }

.btn-primary {
  background: linear-gradient(135deg, #6e40cf 0%, #583fe4 60%, #3f60e4 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 16px rgba(100, 54, 198, 0.2);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
  box-shadow: 0 0 28px rgba(100, 54, 198, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.card-glass {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.card-glass:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(100, 54, 198, 0.35);
  transform: translateY(-3px);
}

.card-glass-warning {
  background: rgba(255, 174, 1, 0.025);
  border: 1px solid rgba(255, 174, 1, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.text-gradient {
  background: linear-gradient(135deg, #7961ac 0%, #6436c6 25%, #583fe4 55%, #3f60e4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.icon-box {
  background: rgba(100, 54, 198, 0.12);
  border: 1px solid rgba(100, 54, 198, 0.25);
  transition: background 0.25s, box-shadow 0.25s;
}

.card-glass:hover .icon-box {
  background: rgba(100, 54, 198, 0.22);
  box-shadow: 0 0 14px rgba(100, 54, 198, 0.25);
}

.divider-gradient {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(100, 54, 198, 0.3) 35%,
    rgba(63, 96, 228, 0.3) 65%,
    transparent 100%
  );
}

#mobile-menu {
  background: rgba(13, 11, 33, 0.96);
  backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
  max-height: 320px;
}

.form-input {
  width: 100%;
  border-radius: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  color: #e8e4ff;
  font-size: 0.9375rem;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-input:focus {
  border-color: #6436c6;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 3px rgba(100, 54, 198, 0.12);
}

.form-input.error {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input-icon {
  position: absolute;
  top: 50%;
  left: 0.875rem;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  transition: color 0.3s;
}

.form-input-icon.textarea-icon {
  top: 1rem;
  transform: none;
}

.form-group:focus-within .form-input-icon {
  color: rgba(100, 54, 198, 0.7);
}

.form-error-text {
  font-size: 0.8125rem;
  color: #ef4444;
  margin-top: 0.375rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}

.form-error-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.consent-checkbox {
  appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
  position: relative;
}

.consent-checkbox:checked {
  background: #6436c6;
  border-color: #6436c6;
}

.consent-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.consent-checkbox:focus-visible {
  box-shadow: 0 0 0 3px rgba(100, 54, 198, 0.25);
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
  tab-index: -1;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up {
  animation: fadeUp 0.65s ease both;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease both;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-link {
  color: rgba(232, 228, 255, 0.4);
  font-size: 0.875rem;
  transition: color 0.2s;
  text-decoration: none;
}

.footer-link:hover {
  color: #e8e4ff;
}

.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 28rem;
  z-index: 100;
  background: rgba(13, 11, 33, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
  transform: translateY(0);
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-status {
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  text-align: center;
  animation: fadeIn 0.3s ease both;
}

.form-status.success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.form-status.error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.text-violet    { color: #6436c6; }
.text-violet-lt { color: #8b5cf6; }

::selection {
  background: rgba(100, 54, 198, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid rgba(100, 54, 198, 0.6);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .mesh-bg { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
