/* ═══════════════════════════════════════════════════════════════════════
   CtrlShift Website — Visual Enhancements
   Adapted from SD Design Templates (React/TypeScript → Vanilla CSS)
   Brand palette: navy #0F1C2E · blue #054886 · lime #A3BD18
   ═══════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────
   Aurora hero canvas
   Injected by enhancements.js · sits above hero-bg photo
   Source: Aurora Background Prompt (WebGL OGL → Canvas 2D radial gradients)
   ────────────────────────────────────────────────────────────────────── */
#hero-aurora {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
}

/* ──────────────────────────────────────────────────────────────────────
   Hero h1 — shine sweep
   Source: Shiny Text Prompt (motion.js background-clip → pure CSS keyframe)
   Gradient stays near-white; the lime tint sweeps through as highlight
   ────────────────────────────────────────────────────────────────────── */
.hero-content h1 {
  background: linear-gradient(
    120deg,
    #ffffff  0%,
    #ffffff  28%,
    #d4e65c  44%,
    #ffffff  54%,
    #ffffff 100%
  );
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: hero-shine 8s linear infinite;
}

@keyframes hero-shine {
  0%   { background-position: 220% center; }
  100% { background-position: -220% center; }
}

/* Arabic: disable the sweep — complex text reads better without it */
[dir="rtl"] .hero-content h1 {
  animation: none;
  background: none;
  -webkit-text-fill-color: var(--cs-white);
  color: var(--cs-white);
}

/* ──────────────────────────────────────────────────────────────────────
   Stats band — particle canvas
   Injected by enhancements.js
   ────────────────────────────────────────────────────────────────────── */
#stats-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
.stats-band {
  position: relative;
  overflow: hidden;
}
.stats-band .container {
  position: relative;
  z-index: 1;
}

/* ──────────────────────────────────────────────────────────────────────
   Tilt cards — transforms driven by JS mousemove
   Source: Tilted Card Prompt (framer-motion state → vanilla event listeners)
   ────────────────────────────────────────────────────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
}
.tilt-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tilt-card:hover .tilt-glare {
  opacity: 1;
}

/* ──────────────────────────────────────────────────────────────────────
   Service cards — depth lift + lime accent bar
   Source: Luxury Design System + Midnight Editorial style prompts
   ────────────────────────────────────────────────────────────────────── */
.service-card {
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cs-blue) 0%, var(--cs-lime) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover::after {
  transform: scaleX(1);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(5, 72, 134, 0.14), 0 4px 12px rgba(5, 72, 134, 0.08);
}

/* ──────────────────────────────────────────────────────────────────────
   Team cards — depth lift on hover
   ────────────────────────────────────────────────────────────────────── */
.team-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(5, 72, 134, 0.13);
}

/* ──────────────────────────────────────────────────────────────────────
   Value cards — border highlight + lift
   ────────────────────────────────────────────────────────────────────── */
.value-card {
  transition: border-color 0.3s ease, transform 0.3s ease,
              box-shadow 0.3s ease, background 0.3s ease;
}
.value-card:hover {
  border-color: var(--cs-blue);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(5, 72, 134, 0.1);
  background: var(--bg-soft);
}

/* ──────────────────────────────────────────────────────────────────────
   Insight cards — depth lift + blue border
   ────────────────────────────────────────────────────────────────────── */
.insight-card {
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.insight-card:hover {
  border-color: var(--cs-blue);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(5, 72, 134, 0.1);
}

/* ──────────────────────────────────────────────────────────────────────
   Service list items — directional slide on hover
   ────────────────────────────────────────────────────────────────────── */
.service-list-item {
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.service-list-item:hover {
  border-color: var(--cs-blue);
  background: var(--bg-soft);
  transform: translateX(4px);
}
[dir="rtl"] .service-list-item:hover {
  transform: translateX(-4px);
}

/* ──────────────────────────────────────────────────────────────────────
   Career items — left-edge reveal bar
   ────────────────────────────────────────────────────────────────────── */
.career-item {
  position: relative;
  overflow: hidden;
}
.career-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cs-blue) 0%, var(--cs-lime) 100%);
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.career-item:hover::before {
  transform: scaleY(1);
}
[dir="rtl"] .career-item::before {
  left: auto;
  right: 0;
}

/* ──────────────────────────────────────────────────────────────────────
   Electric border — CTA/primary buttons
   Source: Electric Border Prompt (Perlin canvas noise → CSS @property)
   ────────────────────────────────────────────────────────────────────── */
@property --btn-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.btn-electric {
  position: relative;
  z-index: 0;
  isolation: isolate;
}
.btn-electric::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--btn-angle),
    transparent   0deg,
    #A3BD18       50deg,
    #ffffff       85deg,
    #A3BD18      120deg,
    transparent  180deg,
    #054886      235deg,
    rgba(5,72,134,0.45) 270deg,
    transparent  360deg
  );
  z-index: -1;
  animation: btn-electric-spin 2.8s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.btn-electric::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: inherit;
  border-radius: inherit;
  z-index: -1;
}
.btn-electric:hover::before {
  opacity: 1;
}

@keyframes btn-electric-spin {
  from { --btn-angle: 0deg; }
  to   { --btn-angle: 360deg; }
}

/* ──────────────────────────────────────────────────────────────────────
   Scroll progress bar — fixed 2 px at page top
   ────────────────────────────────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--cs-blue) 0%, var(--cs-lime) 100%);
  z-index: 10000;
  pointer-events: none;
}

/* ──────────────────────────────────────────────────────────────────────
   Nav — enhanced frosted glass reinforcement
   Layered over the .scrolled class that main.js already adds
   ────────────────────────────────────────────────────────────────────── */
.site-nav.scrolled {
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(15, 28, 46, 0.9) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 24px rgba(0, 0, 0, 0.25);
}

/* ──────────────────────────────────────────────────────────────────────
   CTA banner — radial mesh overlay + enhanced depth
   Source: Midnight Editorial style prompt radial accent technique
   ────────────────────────────────────────────────────────────────────── */
.cta-banner-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 80% at 12% 50%, rgba(163, 189, 24, 0.07) 0%, transparent 65%),
    radial-gradient(ellipse 50% 65% at 88% 50%, rgba(5, 72, 134, 0.14)  0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ──────────────────────────────────────────────────────────────────────
   Section header — eyebrow with lime accent line
   Source: Luxury Design System + Swiss Style prompts
   ────────────────────────────────────────────────────────────────────── */
.section-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.section-header .eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--cs-lime);
  flex-shrink: 0;
}
[dir="rtl"] .section-header .eyebrow {
  flex-direction: row-reverse;
}
[dir="rtl"] .section-header .eyebrow::before {
  display: none;
}
[dir="rtl"] .section-header .eyebrow::after {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--cs-lime);
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────────────────
   Section decorative numbers
   Source: Architectural Type System style prompt
   Large faint ordinal numbers as editorial layout ornament
   ────────────────────────────────────────────────────────────────────── */
.section-deco-num {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-7);
  font-family: var(--font-en-display);
  font-size: 110px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(5, 72, 134, 0.04);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
[dir="rtl"] .section-deco-num {
  right: auto;
  left: var(--sp-7);
}

/* ──────────────────────────────────────────────────────────────────────
   Page hero — clean bottom edge (no fade, consistent with home hero)
   ────────────────────────────────────────────────────────────────────── */
.page-hero {
  position: relative;
  overflow: hidden;
}

/* ──────────────────────────────────────────────────────────────────────
   Process steps — soft hover fill
   ────────────────────────────────────────────────────────────────────── */
.process-step {
  transition: background 0.25s ease;
}
.process-step:hover {
  background: var(--bg-soft);
}

/* ──────────────────────────────────────────────────────────────────────
   Floating lines canvas (services section background texture)
   Source: Floating Lines Background Prompt
   ────────────────────────────────────────────────────────────────────── */
.floating-lines-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
}

/* ──────────────────────────────────────────────────────────────────────
   Stagger delay helpers (extends main.css .delay-1..4)
   ────────────────────────────────────────────────────────────────────── */
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; }
.delay-8 { transition-delay: 0.8s; }

/* ──────────────────────────────────────────────────────────────────────
   Responsive adjustments
   ────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #hero-aurora     { opacity: 0.3; }
  .section-deco-num { font-size: 64px; }

  /* Disable lift transforms on touch/mobile */
  .service-card:hover,
  .team-card:hover,
  .value-card:hover,
  .insight-card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ──────────────────────────────────────────────────────────────────────
   Dark Differentiators Section
   Source: DifferentiatorsSection.jsx (React inline styles → CSS class)
   Midnight Editorial + Luxury style: dark bg, ruled grid, lime accents
   ────────────────────────────────────────────────────────────────────── */
.diff-dark {
  background: var(--cs-navy);
}
.diff-dark .section-header .eyebrow {
  color: var(--cs-lime);
}
.diff-dark .section-header .eyebrow::before {
  background: var(--cs-lime);
}
.diff-dark .section-header h2 {
  color: var(--cs-white);
}
.diff-dark .differentiators-grid {
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.10);
  border-left: 1px solid rgba(255,255,255,0.10);
  margin-top: var(--sp-8);
}
.diff-dark .differentiator-card {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  padding: var(--sp-7) var(--sp-6);
  transition: background 0.3s ease;
}
.diff-dark .differentiator-card:hover {
  background: rgba(255,255,255,0.04);
}
.diff-dark .differentiator-card::before {
  display: none;
}
.diff-dark .differentiator-card h4 {
  color: var(--cs-white);
  font-size: 17px;
  margin-bottom: var(--sp-3);
}
.diff-dark .differentiator-card p {
  color: rgba(255,255,255,0.62);
  font-size: var(--fs-small);
  line-height: 1.65;
}
/* Lime accent number per card — Architectural Type System influence */
.diff-dark .differentiator-card::after {
  content: attr(data-num);
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  font-family: var(--font-en-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cs-lime);
  opacity: 0.7;
}
[dir="rtl"] .diff-dark .differentiator-card::after {
  right: auto;
  left: var(--sp-5);
}

/* ──────────────────────────────────────────────────────────────────────
   Card link arrow — translate right on hover
   Source: Bold Editorial + Luxury style prompts arrow animation pattern
   ────────────────────────────────────────────────────────────────────── */
.service-card-link svg,
.insight-card-link svg {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.service-card:hover .service-card-link svg,
.insight-card:hover .insight-card-link svg {
  transform: translateX(5px);
}
[dir="rtl"] .service-card:hover .service-card-link svg,
[dir="rtl"] .insight-card:hover .insight-card-link svg {
  transform: translateX(-5px);
}

/* ──────────────────────────────────────────────────────────────────────
   Ghost cursor
   Source: Ghost Cursor Prompt — trailing dot + ring premium feel
   Colors changed: white/default → cs-lime dot, transparent ring
   ────────────────────────────────────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cs-lime);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.1s ease;
  mix-blend-mode: normal;
}
#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(163, 189, 24, 0.4);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease,
              width 0.3s ease,
              height 0.3s ease;
}
#cursor-ring.hovering {
  width: 44px; height: 44px;
  border-color: rgba(163, 189, 24, 0.7);
}
/* Hide on touch devices — handled by JS too */
@media (hover: none) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* ──────────────────────────────────────────────────────────────────────
   Enhanced client logo grid
   Logos filter to full color + scale up on hover
   ────────────────────────────────────────────────────────────────────── */
.client-logo-item {
  transition: filter 0.35s ease, transform 0.35s ease, opacity 0.35s ease;
  filter: grayscale(100%) opacity(0.55);
}
.client-logo-item:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.06);
}
.client-logo-item img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

/* ──────────────────────────────────────────────────────────────────────
   Service card icon — icon scales up on hover
   Source: Luxury + Modern Bold style prompts icon hover pattern
   ────────────────────────────────────────────────────────────────────── */
.service-card-icon {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.3s ease;
}
.service-card:hover .service-card-icon {
  transform: scale(1.15);
  color: var(--cs-blue);
}

/* ──────────────────────────────────────────────────────────────────────
   Improved logo sizing — transparent logo on dark nav
   ────────────────────────────────────────────────────────────────────── */
.nav-logo img,
.footer-logo {
  height: 32px;
  width: auto;
}

/* ──────────────────────────────────────────────────────────────────────
   Reduced motion — disable all animations and canvas effects
   ────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-content h1 {
    animation: none;
    background: none;
    -webkit-text-fill-color: var(--cs-white);
    color: var(--cs-white);
  }
  #hero-aurora,
  #stats-particles,
  .floating-lines-canvas {
    display: none;
  }
  .btn-electric::before {
    animation: none;
    opacity: 0 !important;
  }
  .service-card,
  .team-card,
  .value-card,
  .insight-card,
  .service-list-item,
  .career-item {
    transition: border-color 0.15s;
  }
}
