/* ===== PREMIUM EFFECTS — BYTEROOT ===== */

/* ---------- Custom Cursor ---------- */
.has-custom-cursor * { cursor: none !important; }

#cursorDot {
  position: fixed; z-index: 9999; pointer-events: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple, #6366f1);
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  will-change: left, top;
}
#cursorRing {
  position: fixed; z-index: 9998; pointer-events: none;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(99,102,241,0.4);
  transform: translate(-50%, -50%);
  will-change: left, top;
  transition: width 0.25s, height 0.25s, border-color 0.25s, opacity 0.25s;
}
.cursor-dot--hover { width: 10px !important; height: 10px !important; }
.cursor-ring--hover {
  width: 52px !important; height: 52px !important;
  border-color: rgba(99,102,241,0.2) !important;
  background: rgba(99,102,241,0.04);
}
@media (pointer: coarse) {
  #cursorDot, #cursorRing { display: none; }
  .has-custom-cursor * { cursor: auto !important; }
}

/* ---------- Ambient Glow ---------- */
#ambientGlow {
  position: fixed; z-index: 0; pointer-events: none;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,255,48,0.04) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: left 0.8s ease, top 0.8s ease;
  will-change: left, top;
}

/* ---------- Page Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 10000;
  background: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 28px;
}
.loader-logo {
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.4rem;
  letter-spacing: -0.03em; color: #ffffff;
  display: flex; align-items: center; gap: 10px;
}
.loader-logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(168,85,247,0.4);
}
.loader-logo-mark svg { width: 17px; height: 17px; }
.loader-bar {
  width: 200px; height: 2px; background: #222;
  border-radius: 2px; overflow: hidden;
}
#loaderFill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  transition: width 0.1s linear;
  border-radius: 2px;
}

/* ---------- Nav scroll state ---------- */
.nav--scrolled {
  background: rgba(8,8,8,0.96) !important;
  box-shadow: 0 1px 0 var(--border);
}

/* ---------- Reveal classes ---------- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.revealed { opacity: 1; transform: translateY(0); }

/* ---------- Section header animate ---------- */
.section-header { overflow: hidden; }
.section-header .section-tag,
.section-header .section-title,
.section-header .section-sub {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section-header.revealed .section-tag  { opacity: 1; transform: none; transition-delay: 0s; }
.section-header.revealed .section-title { opacity: 1; transform: none; transition-delay: 0.1s; }
.section-header.revealed .section-sub  { opacity: 1; transform: none; transition-delay: 0.2s; }

/* ---------- Service card premium hover ---------- */
.service-card {
  transform-style: preserve-3d;
  transition: background 0.2s, transform 0.3s ease !important;
  will-change: transform;
}
.service-card::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; z-index: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(201,255,48,0.06), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.service-card:hover::after { opacity: 1; }

/* ---------- Pricing card featured glow ---------- */
.pricing-card--featured::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(201,255,48,0.15), transparent 60%);
  z-index: -1;
}

/* ---------- Portfolio / Work Section ---------- */
.work-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
}
.work-card {
  background: var(--bg);
  padding: 0;
  position: relative; overflow: hidden;
  aspect-ratio: 4/3;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer;
  transition: background 0.25s;
}
.work-card-bg {
  position: absolute; inset: 0; z-index: 0;
  transition: transform 0.6s ease;
}
.work-card:hover .work-card-bg { transform: scale(1.05); }
.work-card-bg-1 {
  background: linear-gradient(135deg, #0a1a0a 0%, #111d0f 40%, #0d1508 100%);
}
.work-card-bg-2 {
  background: linear-gradient(135deg, #080d1a 0%, #0f1220 50%, #080a15 100%);
}
.work-card-bg-3 {
  background: linear-gradient(135deg, #12080a 0%, #1a0d10 50%, #0d0609 100%);
}
/* Abstract geometric pattern per card */
.work-card-bg-1::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(201,255,48,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(201,255,48,0.04) 0%, transparent 40%);
}
.work-card-bg-2::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(56,189,248,0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(99,102,241,0.07) 0%, transparent 45%);
}
.work-card-bg-3::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 60% 20%, rgba(251,113,133,0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 25% 70%, rgba(251,146,60,0.05) 0%, transparent 40%);
}
.work-card-grid-lines {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
}
.work-card-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(8,8,8,0.95) 0%, rgba(8,8,8,0.3) 50%, transparent 100%);
  transition: background 0.3s;
}
.work-card:hover .work-card-overlay {
  background: linear-gradient(to top, rgba(8,8,8,0.98) 0%, rgba(8,8,8,0.5) 60%, transparent 100%);
}
.work-card-content {
  position: relative; z-index: 2;
  padding: 28px;
  transform: translateY(8px); opacity: 0.85;
  transition: transform 0.35s ease, opacity 0.35s;
}
.work-card:hover .work-card-content { transform: translateY(0); opacity: 1; }
.work-service {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--lime); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.work-service::before { content: ''; width: 20px; height: 1px; background: var(--lime); }
.work-title {
  font-family: var(--display); font-size: 1.25rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text); margin-bottom: 8px; line-height: 1.2;
}
.work-outcome {
  font-size: 0.8rem; color: rgba(201,255,48,0.7); font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.04em;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}
.work-card:hover .work-outcome { opacity: 1; transform: translateY(0); }
.work-arrow {
  position: absolute; top: 24px; right: 24px; z-index: 2;
  font-family: var(--mono); font-size: 1.1rem; color: var(--lime);
  opacity: 0; transform: translate(-6px, 6px);
  transition: opacity 0.25s, transform 0.25s;
}
.work-card:hover .work-arrow { opacity: 1; transform: translate(0, 0); }

/* ---------- Why Section ---------- */
.why-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
}
.why-card {
  background: var(--bg); padding: 40px;
  transition: background 0.2s;
}
.why-card:hover { background: var(--bg3); }
.why-icon {
  width: 44px; height: 44px; margin-bottom: 20px;
  background: var(--lime-dim); border: 1px solid rgba(201,255,48,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.why-card h3 {
  font-family: var(--display); font-size: 1.1rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text); margin-bottom: 10px;
}
.why-card p { font-size: 0.86rem; color: var(--muted); line-height: 1.7; font-weight: 300; }

/* ---------- Magnetic button wrapper ---------- */
.btn-magnetic {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

/* ---------- Hero text shimmer on em ---------- */
.hero-title em {
  position: relative;
  display: inline-block;
}
.hero-title em::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--lime);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s ease 1.2s;
}
body.loaded .hero-title em::after { transform: scaleX(1); }

/* ---------- Decorative corner marks ---------- */
.corner-mark {
  position: relative;
}
.corner-mark::before, .corner-mark::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--lime); border-style: solid;
}
.corner-mark::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.corner-mark::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f8f7ff; }
::-webkit-scrollbar-thumb { background: #d5d2f5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b8b4ee; }

/* ---------- Selection ---------- */
::selection { background: rgba(99,102,241,0.15); color: #0f0e1a; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .work-grid  { grid-template-columns: 1fr; }
  .why-grid   { grid-template-columns: 1fr; }
  .work-card  { aspect-ratio: 3/2; }
  .work-card-content { transform: none; opacity: 1; }
  .work-outcome { opacity: 1; transform: none; }
}
