@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: #ffffff;
  --primary: #9333ea;
  --primary-glow: rgba(147, 51, 234, 0.25);
  --cyan-accent: #0284c7;
  --indigo-accent: #6366f1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-glass: rgba(226, 232, 240, 0.9);
  --border-glass-glow: rgba(147, 51, 234, 0.4);
}

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

body {
  font-family: 'Assistant', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  direction: rtl;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #581c87;
  font-weight: 700;
  text-decoration: underline;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #6b21a8 !important;
  outline-offset: 3px;
}

main h1:focus {
  outline: none !important;
}

main,
main h1 {
  scroll-margin-top: 6rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9333ea;
}

/* Background Gradients */
.bg-ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 15%, rgba(147, 51, 234, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(99, 102, 241, 0.07) 0%, transparent 50%);
}

/* Interactive Canvas Layer */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.78;
}

/* Glassmorphism Styles */
.glass-panel {
  background: var(--bg-card) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 4px 6px -4px rgba(15, 23, 42, 0.02) !important;
}

.glass-panel-hover {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-hover:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-glass-glow) !important;
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(124, 58, 237, 0.12), 0 0 20px rgba(147, 51, 234, 0.06) !important;
}

/* Glowing Effects */
.glow-primary {
  box-shadow: 0 4px 18px rgba(147, 51, 234, 0.2);
}

.glow-primary-hover {
  transition: all 0.3s ease;
}

.glow-primary-hover:hover {
  box-shadow: 0 6px 25px rgba(168, 85, 247, 0.35);
  transform: scale(1.02);
}

/* Gradient Texts & Buttons */
.gradient-text {
  background: linear-gradient(135deg, #7c3aed 0%, #0284c7 50%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-btn {
  background: linear-gradient(135deg, #7e22ce 0%, #4338ca 50%, #0369a1 100%);
  background-size: 200% auto;
  transition: all 0.3s ease;
  color: #ffffff !important;
}

.gradient-btn * {
  color: #ffffff !important;
}

.gradient-btn:hover {
  background-position: right center;
  box-shadow: 0 0 25px rgba(147, 51, 234, 0.45);
}

/* Typography Overrides */
h1, h2, h3, h4, .font-black, .font-extrabold {
  color: #0f172a;
}

.text-white:not(.keep-white) {
  color: #0f172a;
}

.bg-purple-600,
.bg-purple-600 *,
[id^="nav-"].bg-gradient-to-r,
[id^="nav-"].bg-gradient-to-r *,
.keep-white,
.keep-white * {
  color: #ffffff !important;
}

.text-slate-400 {
  color: #475569 !important;
}

.text-slate-300 {
  color: #334155 !important;
}

.text-slate-200 {
  color: #1e293b !important;
}

.text-slate-500 {
  color: #64748b !important;
}

.text-cyan-400 {
  color: #0369a1 !important;
}

.text-cyan-300 {
  color: #0369a1 !important;
}

.text-blue-300,
.text-blue-400 {
  color: #1d4ed8 !important;
}

.text-purple-400,
.text-purple-300 {
  color: #7c3aed !important;
}

/* Header & Navigation */
header .glass-panel {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08) !important;
}

header nav {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}

header nav button:not(.bg-gradient-to-r) {
  color: #475569 !important;
}

header nav button:not(.bg-gradient-to-r):hover {
  color: #7c3aed !important;
  background: #ffffff !important;
}

header .rounded-full.border-purple-500\/40 {
  background-color: #ffffff !important;
}

/* Tech stack badges & utility elements */
span.bg-slate-900 {
  background-color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05) !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

.border-white\/5,
.border-white\/10,
.border-white\/20 {
  border-color: rgba(226, 232, 240, 0.85) !important;
}

.bg-white\/5,
.bg-white\/10 {
  background-color: rgba(241, 245, 249, 0.65) !important;
}

.from-\[\#07050e\] {
  opacity: 0 !important;
}

/* Form Inputs, Selects & Textareas */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

input::placeholder,
textarea::placeholder {
  color: #64748b !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #9333ea !important;
  outline: 3px solid #6b21a8 !important;
  outline-offset: 2px;
}

/* Modals */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  background-color: rgba(15, 23, 42, 0.5) !important;
  backdrop-filter: blur(8px) !important;
  transition: opacity 0.25s ease-out;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

/* Toast Alert */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  pointer-events: none;
}

#toast-container.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Footer */
footer {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

footer .text-slate-400 {
  color: #64748b !important;
}

footer button:hover {
  color: #0369a1 !important;
}

/* Hero Section with Happy People */
.hero-happy-banner {
  position: relative;
  background: #fbf9ff;
  border-radius: 2.5rem;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.06);
}

.hero-happy-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 18% 20%, rgba(226, 214, 255, 0.38), transparent 58%),
    linear-gradient(135deg, #fdfbff 0%, #f6f2ff 100%);
  pointer-events: none;
}

.hero-happy-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(251, 249, 255, 0.16) 100%);
  pointer-events: none;
}

/* Trust & Numbers Bar */
.trust-bar .count-up {
  display: inline-block;
  min-width: 3ch;
  text-align: center;
}

.trust-bar .rounded-xl {
  transition: transform 0.3s ease;
}

.trust-bar .glass-panel:hover .rounded-xl {
  transform: scale(1.08);
}

@media (max-width: 640px) {
  header {
    padding: 0.5rem !important;
  }

  header > .glass-panel {
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 1.25rem;
  }

  header > .glass-panel > a {
    min-width: 0;
    gap: 0.5rem;
  }

  header > .glass-panel > a > div:last-child > div:last-child {
    display: none;
  }

  header > .glass-panel > a > div:last-child > div:first-child {
    font-size: 1rem;
  }

  header > .glass-panel > div {
    gap: 0.4rem;
  }

  header > .glass-panel .gradient-btn {
    padding: 0.55rem 0.7rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  header #mobile-menu {
    top: 4.5rem;
    left: 0.5rem;
    right: 0.5rem;
  }

  main {
    padding: 1.5rem 0.75rem !important;
  }

  #page-home {
    gap: 0;
  }

  #page-home > :not([hidden]) ~ :not([hidden]) {
    margin-top: 3.5rem;
  }

  .hero-happy-banner {
    padding: 2rem 1rem;
    border-radius: 1.5rem;
  }

  .hero-happy-banner h1 {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.15;
  }

  .hero-happy-banner > .relative.z-10 > div:first-child {
    align-items: flex-start;
    text-align: right;
  }

  .hero-happy-banner > .relative.z-10 > div:nth-child(4) > button {
    width: 100%;
    justify-content: center;
  }

  .hero-happy-banner > .relative.z-10 > div:nth-child(5) img {
    height: 15rem;
  }

  .hero-happy-banner > .relative.z-10 > div:nth-child(5) .absolute.inset-0 {
    padding: 1rem;
  }

  .trust-bar > .glass-panel {
    padding: 1rem;
  }

  main h1 {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    line-height: 1.2;
  }

  main .glass-panel.p-8,
  main .glass-panel.p-10 {
    padding: 1.25rem;
  }

  #page-quote .font-mono {
    overflow-wrap: anywhere;
  }

  .modal-content {
    max-height: 90dvh;
    overflow-y: auto;
  }

  #toast-container {
    width: calc(100% - 2rem);
    justify-content: center;
    border-radius: 1rem;
    text-align: center;
  }
}

@media (max-width: 380px) {
  header > .glass-panel {
    padding-inline: 0.55rem;
  }

  header > .glass-panel > a .w-10 {
    width: 2.25rem;
    height: 2.25rem;
  }

  header > .glass-panel .gradient-btn {
    padding-inline: 0.55rem;
  }

  .hero-happy-banner {
    padding-inline: 0.75rem;
  }

  .hero-happy-banner > .relative.z-10 > div:nth-child(4) {
    gap: 0.65rem;
  }
}

@media (max-width: 640px) {
  input,
  select,
  textarea {
    font-size: 1rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  :focus-visible {
    outline: 2px solid CanvasText !important;
  }

  .skip-link {
    border: 2px solid CanvasText;
  }
}
