/* ═══════════════════════════════════════════════════════════════
   CUSTOM CSS — Pasha Core
   Order: Reset utilities → Cursor → Progress → Reveal →
          Hero → Particles → CTA mesh → Text effects →
          WhatsApp → Process → Portfolio → Form → Filter →
          Buttons → Section label → Dark form → Reduced motion
═══════════════════════════════════════════════════════════════ */

/* ─── Custom Cursor ──────────────────────────────────────────── */
@media (pointer: fine) {
  body { cursor: none; }
  a, button, [data-magnetic], [data-tilt], label, select, input, textarea, summary {
    cursor: none;
  }
}

#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: #0ea5e9;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease,
              background 0.2s ease, opacity 0.2s ease;
  will-change: transform;
}

#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(14, 165, 233, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.35s ease, height 0.35s ease,
              border-color 0.25s ease, background 0.25s ease, opacity 0.2s ease;
  will-change: transform;
}

/* Link hover */
#cursor-dot.on-link  { width: 4px; height: 4px; opacity: 0.4; }
#cursor-ring.on-link { width: 52px; height: 52px; border-color: rgba(14,165,233,0.8); }

/* CTA / WA button hover */
#cursor-dot.on-cta   { background: #10b981; width: 8px; height: 8px; }
#cursor-ring.on-cta  { width: 60px; height: 60px; border-color: rgba(52,211,153,0.7); background: rgba(52,211,153,0.05); }

/* Input hover */
#cursor-dot.on-input  { width: 3px; height: 18px; border-radius: 2px; background: #0ea5e9; }
#cursor-ring.on-input { opacity: 0; }

/* Hidden on touch / mobile */
@media (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* ─── Scroll Progress Bar ─────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #22d3ee);
  z-index: 9997;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
  box-shadow: 0 0 8px rgba(14,165,233,0.6);
}

/* ─── Scroll Reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for grid children */
.reveal-group > *:nth-child(1) { transition-delay:   0ms; }
.reveal-group > *:nth-child(2) { transition-delay: 100ms; }
.reveal-group > *:nth-child(3) { transition-delay: 200ms; }
.reveal-group > *:nth-child(4) { transition-delay: 300ms; }
.reveal-group > *:nth-child(5) { transition-delay: 400ms; }
.reveal-group > *:nth-child(6) { transition-delay: 500ms; }

/* Left / right slide variants */
.reveal-left  { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal-right { opacity: 0; transform: translateX(40px);  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal-left.visible, .reveal-right.visible { opacity: 1; transform: translateX(0); }

/* Scale variant */
.reveal-scale { opacity: 0; transform: scale(0.92); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* ─── Hero — Word Reveal Animation ───────────────────────────── */
#hero-headline {
  perspective: 700px;
}

.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotateX(40deg);
  transform-origin: bottom center;
  animation: wordReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 140ms + 200ms);
}
@keyframes wordReveal {
  to { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

/* ─── Hero Gradient Mesh ─────────────────────────────────────── */
.hero-mesh {
  background:
    radial-gradient(ellipse at 15% 55%, rgba(14,165,233,0.22) 0%, transparent 58%),
    radial-gradient(ellipse at 82% 18%, rgba(99,102,241,0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 60% 85%, rgba(6,182,212,0.12) 0%, transparent 52%);
  transition: background-position 0.1s linear;
  will-change: transform;
}

/* ─── Hero Particles Canvas ──────────────────────────────────── */
#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ─── CTA Banner Mesh ────────────────────────────────────────── */
.cta-mesh {
  background:
    radial-gradient(ellipse at 70% 30%, rgba(14,165,233,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 70%, rgba(99,102,241,0.18) 0%, transparent 55%);
  animation: meshPulse 8s ease-in-out infinite alternate;
}
@keyframes meshPulse {
  0%   { opacity: 0.8; }
  100% { opacity: 1; }
}

/* ─── Gradient Text ──────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #22d3ee 50%, #38bdf8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShine 4s linear infinite;
}
@keyframes textShine {
  to { background-position: 200% center; }
}

/* ─── Dot Grid ───────────────────────────────────────────────── */
.bg-grid {
  background-size: 40px 40px;
  background-image: radial-gradient(circle, rgba(148,163,184,0.45) 1px, transparent 1px);
}
.dark .bg-grid {
  background-image: radial-gradient(circle, rgba(51,65,85,0.6) 1px, transparent 1px);
}

/* ─── WhatsApp Float + Pulse ─────────────────────────────────── */
#wa-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
}
.wa-pulse-ring {
  position: absolute;
  inset: -5px;
  border-radius: 9999px;
  border: 2.5px solid rgba(52, 211, 153, 0.55);
  animation: pulseRing 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes pulseRing {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ─── Card 3D Tilt ───────────────────────────────────────────── */
[data-tilt] {
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease;
  will-change: transform;
}
[data-tilt]:hover {
  box-shadow: 0 20px 40px rgba(14,165,233,0.08), 0 4px 12px rgba(0,0,0,0.06);
}

/* ─── Magnetic Button ─────────────────────────────────────────── */
[data-magnetic] {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  will-change: transform;
}

/* ─── Process Stepper ────────────────────────────────────────── */
@media (min-width: 768px) {
  .process-step:not(:last-child) .step-circle-wrap::after {
    content: '';
    position: absolute;
    left: calc(100% + 0.5rem);
    top: 50%;
    width: calc(100% - 1rem);
    border-top: 2px dashed rgba(14,165,233,0.3);
    pointer-events: none;
  }
}

/* ─── Portfolio Card ─────────────────────────────────────────── */
.portfolio-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.portfolio-card.card-hidden {
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
}
.portfolio-card.card-gone {
  display: none;
}

/* ─── Browser Chrome Mockup ──────────────────────────────────── */
.browser-chrome {
  border-radius: 0.75rem 0.75rem 0 0;
  background: #1e2837;
  padding: 0.6rem 0.8rem 0;
}
.browser-dots {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.browser-dots span {
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
}
.browser-dot-red    { background: #ef4444; }
.browser-dot-yellow { background: #f59e0b; }
.browser-dot-green  { background: #22c55e; }
.browser-url {
  background: rgba(51,65,85,0.5);
  border-radius: 4px;
  height: 18px;
  width: 58%;
  margin: 0 auto 0.5rem;
}

/* ─── Form Inputs ────────────────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  appearance: none;
}
.form-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}
.dark .form-input {
  background: #0f172a;
  border-color: #1e293b;
  color: #f1f5f9;
}
.dark .form-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.18);
}

/* Select arrow */
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* ─── Filter Buttons ─────────────────────────────────────────── */
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 1.5px solid #e2e8f0;
  background: transparent;
  cursor: none;
  transition: all 0.2s ease;
  color: inherit;
}
.filter-btn:hover,
.filter-btn.active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #ffffff;
}
.dark .filter-btn {
  border-color: #1e293b;
}

/* ─── Section Label ──────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0ea5e9;
  margin-bottom: 0.75rem;
}

/* ─── Gradient Border on Service Cards (hover) ───────────────── */
@property --border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* ─── Navbar hero-transparent state ─────────────────────────── */
.nav-hero-mode .nav-link { color: rgba(255,255,255,0.75) !important; }
.nav-hero-mode .nav-link:hover { color: #fff !important; }

/* ─── FAQ Accordion (details/summary) ───────────────────────── */
.faq-item summary { list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-chevron { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.faq-item {
  border: 1.5px solid;
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

/* ─── Reduced Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none !important;
    transition: none;
  }
  .hero-word {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .gradient-text { animation: none; background-size: 100% auto; }
  .cta-mesh, .wa-pulse-ring { animation: none; }
  #scroll-progress { transition: none; }
}
