/* =====================================================
   PAKLAB / EFFECTS
   Premium interactions. Non-invasive.
   No structural / layout changes.
   ===================================================== */

/* -----------------------------------------------------
   0 · JS-ready gating (prevents FOUC for no-JS users)
   ----------------------------------------------------- */
body.js-ready .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(.22,.61,.36,1),
              transform 0.9s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
body.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger variants for cards/rows */
body.js-ready .reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(.22,.61,.36,1),
              transform 0.7s cubic-bezier(.22,.61,.36,1);
}
body.js-ready .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.00s; opacity: 1; transform: none; }
body.js-ready .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: none; }
body.js-ready .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: none; }
body.js-ready .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; opacity: 1; transform: none; }
body.js-ready .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; opacity: 1; transform: none; }
body.js-ready .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; opacity: 1; transform: none; }
body.js-ready .reveal-stagger.is-visible > *:nth-child(n+7) { transition-delay: 0.48s; opacity: 1; transform: none; }

/* -----------------------------------------------------
   1 · Cursor halo (desktop · non-invasive)
   Does NOT replace native cursor. Adds a tracker.
   ----------------------------------------------------- */
.pk-halo {
  position: fixed;
  top: 0; left: 0;
  width: 24px; height: 24px;
  border: 1px solid var(--red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.28s cubic-bezier(.22,.61,.36,1),
              height 0.28s cubic-bezier(.22,.61,.36,1),
              opacity 0.25s,
              background-color 0.2s;
  opacity: 0;
  mix-blend-mode: difference;
  will-change: transform;
}
.pk-halo.is-active { opacity: 0.6; }
.pk-halo.hover {
  width: 56px; height: 56px;
  background-color: rgba(179,0,0,0.08);
  border-color: rgba(179,0,0,0.9);
}
.pk-halo.click { width: 18px; height: 18px; }

/* Hide halo on touch / mobile / no-hover devices */
@media (max-width: 900px), (hover: none), (pointer: coarse) {
  .pk-halo { display: none !important; }
}

/* -----------------------------------------------------
   2 · Scroll progress bar (top 2px red line)
   ----------------------------------------------------- */
.pk-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--red);
  width: 0;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(179,0,0,0.35);
  transition: opacity 0.3s;
}

/* -----------------------------------------------------
   3 · Nav scrolled state (blur + shadow on scroll)
   ----------------------------------------------------- */
.nav {
  transition: background-color 0.3s,
              backdrop-filter 0.3s,
              box-shadow 0.3s,
              border-color 0.3s;
}
.nav.is-scrolled {
  background: rgba(244, 241, 236, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06),
              0 8px 24px -12px rgba(0,0,0,0.10);
  border-bottom-color: transparent;
}
body.dark .nav.is-scrolled,
body[data-screen-label="STORY"] .nav.is-scrolled {
  background: rgba(10, 10, 10, 0.82);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06),
              0 8px 24px -12px rgba(0,0,0,0.6);
}

/* -----------------------------------------------------
   4 · Button enhancements — shine + lift on hover
   ----------------------------------------------------- */
.cta-red {
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s,
              transform 0.25s cubic-bezier(.22,.61,.36,1),
              box-shadow 0.3s cubic-bezier(.22,.61,.36,1);
}
.cta-red::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
                transparent 30%,
                rgba(255,255,255,0.30) 50%,
                transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.cta-red:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -6px rgba(179,0,0,0.40);
}
.cta-red:hover::before {
  transform: translateX(100%);
}
.cta-red:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px -2px rgba(179,0,0,0.30);
}

.cta-ghost {
  transition: color 0.2s,
              background-color 0.25s,
              border-color 0.2s,
              transform 0.25s cubic-bezier(.22,.61,.36,1),
              box-shadow 0.3s;
}
.cta-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(0,0,0,0.25);
}

/* -----------------------------------------------------
   5 · Nav links · underline draw-in from left
   ----------------------------------------------------- */
.nav-links a {
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: auto;
  bottom: -2px;
  width: 0; height: 1px;
  background: var(--red);
  transition: width 0.35s cubic-bezier(.22,.61,.36,1);
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-links a.active::after {
  width: 100%;
}

/* -----------------------------------------------------
   6 · Footer links · slide on hover
   ----------------------------------------------------- */
.footer-list a {
  position: relative;
  transition: color 0.2s cubic-bezier(.22,.61,.36,1),
              padding-left 0.25s cubic-bezier(.22,.61,.36,1),
              letter-spacing 0.25s;
}
.footer-list a::before {
  content: '→';
  position: absolute;
  left: -14px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s, transform 0.25s;
  color: var(--red);
}
.footer-list a:hover {
  padding-left: 14px;
  color: var(--red);
}
.footer-list a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* -----------------------------------------------------
   7 · Form inputs · red focus glow
   ----------------------------------------------------- */
.inquiry-form input,
.inquiry-form select,
.inquiry-form textarea,
.apply-form input,
.apply-form select,
.apply-form textarea {
  transition: border-color 0.25s cubic-bezier(.22,.61,.36,1),
              box-shadow 0.25s cubic-bezier(.22,.61,.36,1),
              background-color 0.2s;
}
.inquiry-form input:focus,
.inquiry-form select:focus,
.inquiry-form textarea:focus,
.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  border-bottom-color: var(--red);
  box-shadow: 0 2px 0 -1px var(--red);
}

/* Form pills hover */
.role-pill, #role-pills label {
  transition: transform 0.2s cubic-bezier(.22,.61,.36,1),
              border-color 0.2s,
              background-color 0.2s;
}
.role-pill:hover, #role-pills label:hover {
  transform: translateY(-1px);
}

/* -----------------------------------------------------
   8 · Service / Role / Retail card hover lift
   ----------------------------------------------------- */
.service-card,
.role-card,
.retail-card,
.num-card,
.cap-card {
  transition: transform 0.35s cubic-bezier(.22,.61,.36,1),
              box-shadow 0.4s cubic-bezier(.22,.61,.36,1),
              border-color 0.25s;
}
.service-card:hover,
.retail-card:hover,
.num-card:hover,
.cap-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,0.18);
}

/* Role card head · subtle indicator on hover */
.role-head {
  transition: background-color 0.25s;
}
.role-head:hover .r-num {
  color: var(--red) !important;
}
.r-num {
  transition: color 0.25s;
}

/* -----------------------------------------------------
   9 · Work row (INVICTUS etc.) · premium row hover
   ----------------------------------------------------- */
.work-row,
.roster-row {
  transition: background-color 0.35s cubic-bezier(.22,.61,.36,1),
              padding-left 0.35s cubic-bezier(.22,.61,.36,1);
  position: relative;
  overflow: hidden;
}
.work-row::before,
.roster-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s cubic-bezier(.22,.61,.36,1);
}
.work-row:hover::before,
.roster-row:hover::before {
  transform: scaleY(1);
}
.work-row:hover,
.roster-row:hover {
  padding-left: 12px;
}

/* -----------------------------------------------------
  10 · Section head · red accent tick slides in
  ----------------------------------------------------- */
.section-head {
  position: relative;
}
.section-head::before {
  content: '';
  position: absolute;
  top: 4px; left: -28px;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.7s cubic-bezier(.22,.61,.36,1) 0.2s;
}
.section-head.is-visible::before {
  width: 20px;
}

/* Desktop-only */
@media (max-width: 900px) {
  .section-head::before { display: none; }
}

/* -----------------------------------------------------
  11 · Hero entrance (home) — staggered fade up
  ----------------------------------------------------- */
.hero-title {
  animation: pk-heroIn 1.1s cubic-bezier(.22,.61,.36,1) 0.1s backwards;
}
.hero-manifesto {
  animation: pk-heroIn 1.0s cubic-bezier(.22,.61,.36,1) 0.4s backwards;
}
.hero-ctas {
  animation: pk-heroIn 0.9s cubic-bezier(.22,.61,.36,1) 0.65s backwards;
}
.hero-meta {
  animation: pk-heroIn 0.9s cubic-bezier(.22,.61,.36,1) 0.15s backwards;
}
@keyframes pk-heroIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

/* Careers hero / Story hero same pattern */
.careers-hero h1,
.story-hero-title {
  animation: pk-heroIn 1.1s cubic-bezier(.22,.61,.36,1) 0.1s backwards;
}
.story-hero-sub,
.story-hero-meta {
  animation: pk-heroIn 1.0s cubic-bezier(.22,.61,.36,1) 0.35s backwards;
}

/* -----------------------------------------------------
  12 · Number pulse on the receipts (9 / 8 / 001)
  ----------------------------------------------------- */
.num-card .val,
.hero-9 {
  position: relative;
}
.num-card.is-visible .val,
.hero-9 {
  animation: pk-numIn 1.4s cubic-bezier(.22,.61,.36,1) backwards;
}
@keyframes pk-numIn {
  0%   { opacity: 0; transform: scale(0.88) translateY(16px); }
  60%  { opacity: 1; transform: scale(1.04) translateY(0); }
  100% { transform: scale(1); }
}

/* -----------------------------------------------------
  13 · Lang toggle · smooth slide indicator
  ----------------------------------------------------- */
.lang-toggle { position: relative; }
.lang-toggle button {
  position: relative;
  z-index: 1;
  transition: color 0.25s cubic-bezier(.22,.61,.36,1);
}
.lang-toggle button.active {
  color: #fff !important;
}

/* -----------------------------------------------------
  14 · Retail "01 / 02" ghost number floats slightly
  ----------------------------------------------------- */
.retail-card .ghost-num {
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1),
              opacity 0.4s;
}
.retail-card:hover .ghost-num {
  transform: translateY(-8px) scale(1.04);
  opacity: 0.15;
}

/* -----------------------------------------------------
  15 · Story page · chapter pullquote · fade up on reveal
  ----------------------------------------------------- */
body.js-ready .ch {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.0s cubic-bezier(.22,.61,.36,1),
              transform 1.0s cubic-bezier(.22,.61,.36,1);
}
body.js-ready .ch.is-visible {
  opacity: 1;
  transform: none;
}

/* -----------------------------------------------------
  16 · Image / logo soft hover
  ----------------------------------------------------- */
img, .retail-card, .pipeline-row {
  transition: transform 0.4s cubic-bezier(.22,.61,.36,1),
              filter 0.4s;
}
.retail-card:hover img,
.pipeline-row:hover {
  transform: scale(1.02);
}

/* -----------------------------------------------------
  17 · Selection color
  ----------------------------------------------------- */
::selection {
  background: var(--red);
  color: #fff;
}
::-moz-selection {
  background: var(--red);
  color: #fff;
}

/* -----------------------------------------------------
  18 · Smooth scrolling
  ----------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* -----------------------------------------------------
  19 · Accessibility · respect reduced motion
  ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  body.js-ready .reveal,
  body.js-ready .reveal-stagger > *,
  body.js-ready .ch {
    opacity: 1 !important;
    transform: none !important;
  }
  .pk-halo, .pk-progress { display: none !important; }
}

/* =====================================================
   DARK SECTION ENHANCEMENTS
   Extra polish for dark-themed sections.
   ===================================================== */

/* Subtle red accent line on dark section top */
.dark-section {
  position: relative;
}
.dark-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 80px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1) 0.2s;
  z-index: 1;
}
.dark-section.is-visible::before,
.dark-section .section-head.is-visible ~ *,
body.js-ready .dark-section::before {
  transform: scaleX(1);
}

/* Section heads inside dark sections — red slide-in tick stays visible */
.dark-section .section-head::before {
  background: var(--red);
}

/* Enhanced hover on dark pipeline rows */
.dark-section .pipeline-row {
  position: relative;
}
.dark-section .pipeline-row::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 0; height: 2px;
  background: var(--red);
  transform: translateY(-50%);
  transition: width 0.35s cubic-bezier(.22,.61,.36,1);
}
.dark-section .pipeline-row:hover::before {
  width: 24px;
}
.dark-section .pipeline-row:hover {
  padding-left: 34px !important;
}

/* Story page · extra entrance polish */
body.dark .story-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 40%;
  max-width: 300px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(179,0,0,0.6), transparent);
  pointer-events: none;
}
.story-hero { position: relative; }

/* Dark chapter pullquote — soft red glow */
body.dark .ch-pullquote {
  position: relative;
}
body.dark .ch-pullquote::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--red);
  box-shadow: 0 0 16px rgba(179,0,0,0.5);
}
body.dark .ch-pullquote { border-left-color: transparent; }

/* Dark ::selection */
body.dark ::selection { background: var(--red); color: #fff; }

/* Mobile — reduce accent visuals */
@media (max-width: 768px) {
  .dark-section::before {
    width: 50px;
    height: 2px;
  }
  .dark-section .pipeline-row:hover::before { width: 12px; }
  .dark-section .pipeline-row:hover { padding-left: 18px !important; }
}
