/* ===========================
   SHARED DESIGN SYSTEM VARS
   =========================== */

:root {
  --bg: #06060b;
  --accent: #6c5ce7;
  --accent2: #00cec9;
  --accent3: #fd79a8;
  --gradient: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
  --border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

code, pre, .code {
  font-family: 'JetBrains Mono', monospace;
}

/* ===========================
   MOBILE BURGER MENU
   =========================== */

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 100;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent2);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(6, 6, 11, 0.98);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    z-index: 99;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   NAV SCROLL EFFECT
   =========================== */

.nav {
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(6, 6, 11, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ===========================
   COOKIE CONSENT BANNER
   =========================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(6, 6, 11, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 24px;
  z-index: 98;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.cookie-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cookie-btn-accept {
  background: var(--gradient);
  color: white;
}

.cookie-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.4);
}

.cookie-btn-decline {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
}

.cookie-btn-decline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-buttons {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
  }
}

/* ===========================
   TOAST NOTIFICATIONS
   =========================== */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(6, 6, 11, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.hide {
  animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success {
  border-left: 4px solid #00d084;
}

.toast-success .toast-icon {
  color: #00d084;
}

.toast-success .toast-icon::before {
  content: '✓';
  font-weight: 700;
  font-size: 16px;
}

.toast-error {
  border-left: 4px solid #fd79a8;
}

.toast-error .toast-icon {
  color: #fd79a8;
}

.toast-error .toast-icon::before {
  content: '✕';
  font-weight: 700;
  font-size: 16px;
}

.toast-message {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.5;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* ===========================
   FORM SUBMISSION SUCCESS MODAL
   =========================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: rgba(6, 6, 11, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  max-width: 400px;
  text-align: center;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  position: relative;
}

.modal-checkmark svg {
  width: 100%;
  height: 100%;
}

.modal-checkmark circle {
  fill: none;
  stroke: var(--accent2);
  stroke-width: 2;
  stroke-dasharray: 251;
  stroke-dashoffset: 251;
  animation: circleAnimation 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.2s;
}

.modal-checkmark path {
  fill: none;
  stroke: var(--accent2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkAnimation 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.6s;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.modal-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 32px;
}

.modal-button {
  padding: 12px 32px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.modal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.4);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes circleAnimation {
  from {
    stroke-dashoffset: 251;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes checkAnimation {
  from {
    stroke-dashoffset: 50;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 640px) {
  .modal-card {
    margin: 20px;
    padding: 40px 24px;
  }

  .modal-title {
    font-size: 20px;
  }
}

/* ===========================
   SCROLL-TO-TOP BUTTON
   =========================== */

.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  background: var(--gradient);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.3);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(108, 92, 231, 0.4);
}

.scroll-to-top::before {
  content: '↑';
  color: white;
  font-size: 20px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .scroll-to-top {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ===========================
   REVEAL ANIMATION
   =========================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

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

/* ===========================
   FORM STYLES
   =========================== */

.contact-form,
#contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: white;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(0, 206, 201, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  padding: 12px 32px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.form-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.4);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-submit.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .contact-form,
  #contact-form {
    gap: 12px;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 10px 12px;
    font-size: 16px;
  }
}

/* ===========================
   LANGUAGE TOGGLE
   =========================== */

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: #fff;
}

.lang-toggle .lang-active {
  color: #fff;
}

.lang-toggle .lang-separator {
  color: rgba(255, 255, 255, 0.2);
}
