/*!
 * NexKeys Agency — vfx-additions.css
 * ─────────────────────────────────────────────────
 * Cinematic VFX layer — loaded AFTER styles.css.
 * Adds new selectors only. Nothing here overwrites
 * the existing design system.
 *
 * Contents:
 *  §1  · CSS parallax translate composition
 *  §2  · Metallic gold shine sweep (buttons & cards)
 *  §3  · Scroll light sweep (nk-sweep)
 *  §4  · Stat counter flash
 *  §5  · Ambient cursor halo
 *  §6  · Page transition curtain
 *  §7  · Gold text ticker pulse
 *  §8  · Neon-gold section divider line
 *  §9  · Hero headline word-reveal baseline
 * §10  · Luxury scrollbar upgrade
 * §11  · Reduced-motion safety net
 * ─────────────────────────────────────────────────
 */


/* ─── §1  PARALLAX CSS TRANSLATE COMPOSITION ─────
   The `translate` property composites independently
   from `transform`, so ring animations, chip floats,
   and main.js scroll parallax are all preserved.   */

.nk-mono,
.nk-glow,
.nk-ring,
.nk-ring-2,
.chip-a,
.chip-b,
.chip-c,
.hero-grid-bg,
.blob-pink,
.blob-purple {
  /* default zero – JS will write the values */
  translate: var(--px, 0px) var(--py, 0px);
  will-change: translate;
}


/* ─── §2  METALLIC GOLD SHINE SWEEP ─────────────
   A bright diagonal light sweeps across any
   element tagged .nk-shine on hover.
   Already applied to .btn via ::before in styles.css;
   this extends it to cards and interactive elements. */

/* Generic sweep helper — apply .nk-shine to any element */
.nk-shine {
  position: relative;
  overflow: hidden;
}
.nk-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -130%;
  width: 70%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent        0%,
    rgba(255,248,200,.06) 40%,
    rgba(255,248,200,.14) 50%,
    rgba(255,248,200,.06) 60%,
    transparent       100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  transition: left .65s cubic-bezier(.16,1,.3,1);
}
.nk-shine:hover::after {
  left: 140%;
}

/* Apply to gold buttons automatically */
.btn-primary.nk-shine::after {
  background: linear-gradient(
    105deg,
    transparent        0%,
    rgba(255,255,255,.08) 40%,
    rgba(255,255,255,.20) 50%,
    rgba(255,255,255,.08) 60%,
    transparent       100%
  );
}

/* Card subtle shine — lighter version */
.bento-card::after,
.testi-card::after,
.blog-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -110%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    110deg,
    transparent          0%,
    rgba(201,162,39,.04) 45%,
    rgba(201,162,39,.09) 50%,
    rgba(201,162,39,.04) 55%,
    transparent         100%
  );
  transform: skewX(-16deg);
  pointer-events: none;
  transition: left .7s cubic-bezier(.16,1,.3,1);
  z-index: 10;
}
.bento-card:hover::after,
.testi-card:hover::after,
.blog-card:hover::after {
  left: 130%;
}


/* ─── §3  SCROLL LIGHT SWEEP (nk-sweep) ─────────
   Added/removed by vfx.js when cards enter view.
   One-shot animation, not tied to hover state.    */

@keyframes nk-sweep-anim {
  0%   { left: -110%; }
  100% { left: 130%;  }
}

.nk-sweep {
  position: relative;
  overflow: hidden;
}
.nk-sweep::before {
  content: '';
  position: absolute;
  top: 0;
  left: -110%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    108deg,
    transparent          0%,
    rgba(201,162,39,.055) 42%,
    rgba(201,162,39,.13)  50%,
    rgba(201,162,39,.055) 58%,
    transparent         100%
  );
  transform: skewX(-14deg);
  pointer-events: none;
  z-index: 10;
  animation: nk-sweep-anim .80s cubic-bezier(.16,1,.3,1) forwards;
}


/* ─── §4  STAT COUNTER FLASH ─────────────────────
   A bright gold text flash on stat numbers after
   the count-up animation completes.              */

@keyframes nk-counter-flash-anim {
  0%   {
    text-shadow: 0 0  0px transparent;
    filter: brightness(1);
  }
  30%  {
    text-shadow:
      0 0 20px rgba(245,215,110,.7),
      0 0 40px rgba(201,162,39,.5);
    filter: brightness(1.35);
  }
  100% {
    text-shadow: 0 0  0px transparent;
    filter: brightness(1);
  }
}

.nk-counter-flash {
  animation: nk-counter-flash-anim .75s ease-out forwards;
}


/* ─── §5  AMBIENT CURSOR HALO ────────────────────
   The large soft gold orb that lazily follows
   the cursor. Injected by vfx.js.               */

#nk-ambient-orb {
  position: fixed;
  top: 0;
  left: 0;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(201,162,39,.042) 0%,
    rgba(201,162,39,.018) 40%,
    transparent           70%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity .6s ease;
  will-change: transform;
  filter: blur(8px);
}


/* ─── §6  PAGE TRANSITION CURTAIN ────────────────
   Full-viewport black curtain that fades in on
   navigation and fades out on page arrival.     */

#nk-curtain {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #050508;
  pointer-events: none;
  opacity: 0;
  transition: opacity .38s cubic-bezier(.87,0,.13,1);
}
#nk-curtain.nk-curtain-in {
  opacity: 1;
  pointer-events: all;
}


/* ─── §7  GOLD TEXT TICKER PULSE ─────────────────
   Applies to elements with data-gold-ticker attr.
   Adds a slow pulsing gold text-shadow.         */

@keyframes nk-ticker-pulse {
  0%, 100% {
    text-shadow:
      0 0  8px rgba(201,162,39,.0),
      0 0 20px rgba(201,162,39,.0);
  }
  50% {
    text-shadow:
      0 0  8px rgba(201,162,39,.45),
      0 0 24px rgba(201,162,39,.25);
  }
}

.nk-gold-ticker {
  animation: nk-ticker-pulse 3.2s ease-in-out infinite;
}


/* ─── §8  LUXURY GOLD SECTION DIVIDER ───────────
   Replace the plain .divider with a gold shimmer
   line that animates width on scroll.           */

.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent       0%,
    rgba(201,162,39,.35) 30%,
    rgba(245,215,110,.6) 50%,
    rgba(201,162,39,.35) 70%,
    transparent       100%
  );
  background-size: 200% 100%;
  animation: divider-shimmer 4s ease-in-out infinite;
}

@keyframes divider-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position:  -200% center; }
}


/* ─── §9  HERO HEADLINE WORD-REVEAL BASELINE ────
   The `.nk-word` spans injected by vfx.js.
   Inline transitions are already set; this is
   a fallback to ensure visibility if JS is slow. */

.hero-head .nk-word {
  display: inline-block;
}


/* ─── §10  LUXURY SCROLLBAR UPGRADE ─────────────
   Upgrade the 3px scrollbar from styles.css with
   a subtle gradient thumb.                      */

::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-track {
  background: #050508;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    #F5D76E,
    #C9A227,
    #8B6914
  );
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #E8BC2C;
}


/* ─── §11  REDUCED MOTION SAFETY NET ────────────
   All VFX additions honour prefers-reduced-motion. */

@media (prefers-reduced-motion: reduce) {

  /* Kill all new animations */
  .nk-sweep::before,
  .nk-counter-flash,
  .nk-gold-ticker,
  .divider {
    animation: none !important;
  }

  /* Kill shine sweeps */
  .nk-shine::after,
  .bento-card::after,
  .testi-card::after,
  .blog-card::after {
    display: none;
  }

  /* Kill parallax translate */
  .nk-mono,
  .nk-glow,
  .nk-ring,
  .nk-ring-2,
  .chip-a,
  .chip-b,
  .chip-c,
  .hero-grid-bg,
  .blob-pink,
  .blob-purple {
    translate: 0px 0px !important;
  }

  /* Hide ambient orb */
  #nk-ambient-orb {
    display: none;
  }

  /* Instant page transition */
  #nk-curtain {
    transition: none;
  }
}

/* ─── Mobile safeguards ─────────────────────────
   Tilt, parallax and heavy effects are already
   skipped in JS. These CSS rules ensure no
   residual translate causes layout jank.        */

@media (max-width: 767px) {
  .nk-mono,
  .nk-glow,
  .nk-ring,
  .nk-ring-2,
  .chip-a,
  .chip-b,
  .chip-c {
    translate: 0px 0px !important;
  }

  #nk-ambient-orb {
    display: none;
  }
}


/* ─── §12  BLOG POST MODAL ─────────────────────
   Full blog post view modal with dark theme
   and gold accents matching site design.        */

.blog-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.blog-modal.blog-modal-open {
  opacity: 1;
  pointer-events: all;
}

.blog-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.blog-modal-container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: var(--bg-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(201, 162, 39, 0.15);
}

.blog-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(5, 5, 8, 0.8);
  border: 1px solid var(--glass-border);
  color: var(--w-60);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-modal-close:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
  transform: rotate(90deg);
}

.blog-modal-content {
  overflow-y: auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.blog-modal-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: var(--bg-3);
}

.blog-modal-body {
  padding: 32px;
}

.blog-modal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.blog-modal-title {
  font-family: var(--font-head);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-modal-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--w-60);
}

.blog-modal-text p {
  margin-bottom: 16px;
}

.blog-modal-text p:last-child {
  margin-bottom: 0;
}

/* Modal scrollbar */
.blog-modal-content::-webkit-scrollbar {
  width: 4px;
}

.blog-modal-content::-webkit-scrollbar-track {
  background: var(--bg-2);
}

.blog-modal-content::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 2px;
}

/* Responsive modal */
@media (max-width: 768px) {
  .blog-modal-container {
    width: 95%;
    max-height: 95vh;
  }

  .blog-modal-image {
    height: 200px;
  }

  .blog-modal-body {
    padding: 24px;
  }

  .blog-modal-title {
    font-size: 22px;
  }

  .blog-modal-text {
    font-size: 15px;
  }
}

/* Reduced motion for modal */
@media (prefers-reduced-motion: reduce) {
  .blog-modal {
    transition: none;
  }

  .blog-modal-close {
    transition: none;
  }
}


/* ─── §13  BLOG SEARCH INPUT ─────────────────────
   Search input for filtering blog posts.            */

.blog-search-wrapper {
  position: relative;
  margin-bottom: 32px;
  max-width: 500px;
}

.blog-search-input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  background: var(--glass);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.blog-search-input::placeholder {
  color: var(--w-40);
}

.blog-search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.15);
}

.blog-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--w-40);
  pointer-events: none;
  transition: color 0.3s;
}

.blog-search-input:focus + .blog-search-icon {
  color: var(--gold);
}

/* ─── §14  BLOG READING TIME ─────────────────────
   Reading time display on blog cards.              */

.blog-read-time {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--w-40);
  font-family: var(--font-head);
  font-weight: 500;
}

/* ─── §15  BLOG SOCIAL SHARING ───────────────────
   Social share buttons in blog modal.              */

.blog-modal-share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.blog-modal-share-label {
  font-size: 13px;
  color: var(--w-40);
  font-family: var(--font-head);
  font-weight: 600;
}

.blog-share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--w-60);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-share-btn:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ─── §16  BLOG RELATED POSTS ────────────────────
   Related posts section in blog modal.             */

.blog-modal-related {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.blog-modal-related-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--white);
}

.blog-modal-related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-post-item {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.related-post-item:hover {
  background: var(--gold-dim);
  border-color: rgba(201, 162, 39, 0.3);
  transform: translateX(4px);
}

.related-post-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}

.related-post-meta {
  font-size: 12px;
  color: var(--w-40);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-search-wrapper {
    max-width: 100%;
  }

  .blog-modal-share {
    flex-wrap: wrap;
  }

  .blog-modal-related {
    margin-top: 24px;
  }
}


/* ─── §17  BLOG SKELETON LOADER ─────────────────
   Skeleton loading state for blog cards.           */

.blog-skeleton {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  overflow: hidden;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-card::before {
  content: '';
  display: block;
  width: 100%;
  height: 200px;
  background: linear-gradient(
    90deg,
    var(--bg-3) 0%,
    var(--bg-2) 50%,
    var(--bg-3) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-card::after {
  content: '';
  display: block;
  padding: 24px;
}

@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 640px) {
  .blog-skeleton {
    grid-template-columns: 1fr;
  }
}


/* ─── §18  BREADCRUMB NAVIGATION ─────────────────
   Breadcrumb navigation for page hierarchy.       */

.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumb-item a {
  color: var(--w-40);
  transition: color 0.3s;
}

.breadcrumb-item a:hover {
  color: var(--gold);
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  color: var(--w-20);
}

.breadcrumb-item a[aria-current="page"] {
  color: var(--gold);
  font-weight: 600;
  pointer-events: none;
}


/* ─── §19  SCROLL TO TOP BUTTON ─────────────────
   Floating button to scroll back to page top.      */

.scroll-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.3);
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(201, 162, 39, 0.4);
}

.scroll-to-top:active {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
  }
}


/* ─── §20  COOKIE CONSENT BANNER ─────────────────
   GDPR-compliant cookie consent banner.              */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-2);
  border-top: 1px solid var(--glass-border);
  padding: 20px 24px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-consent-text {
  flex: 1;
  color: var(--w-60);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.cookie-consent-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.cookie-consent-link:hover {
  color: var(--gold-dim);
}

.cookie-consent-btn {
  padding: 10px 24px;
  background: var(--grad);
  border: none;
  border-radius: var(--r-pill);
  color: var(--bg);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cookie-consent-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.3);
}

@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cookie-consent-text {
    font-size: 13px;
  }

  .cookie-consent-btn {
    width: 100%;
  }
}