/* ============================================================
   premium-v5.css — flashlight cursor, scramble text, SVG line-draw,
   3D tilt cards, scroll-velocity blur, sticky mini-header.
   Brand-native: detective flashlight, cipher scramble, case-file stamps.
   ============================================================ */

/* ---------- FLASHLIGHT CURSOR (on .flashlight sections) ---------- */
@media (hover: hover) and (min-width: 900px) {
  .flashlight-zone {
    position: relative;
    --fx: 50%;
    --fy: 50%;
    --fsize: 380px;
  }
  .flashlight-zone::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(
        circle var(--fsize) at var(--fx) var(--fy),
        transparent 0%,
        rgba(15,12,9,0.12) 35%,
        rgba(15,12,9,0.72) 100%
      );
    mix-blend-mode: multiply;
    transition: opacity 380ms;
    z-index: 4;
    opacity: 0;
  }
  .flashlight-zone.is-lit::after { opacity: 1; }
}

/* ---------- SCRAMBLE TEXT — char slots keep width stable ---------- */
.scramble {
  display: inline-block;
  white-space: pre-wrap;
}
.scramble__char {
  display: inline-block;
  transition: color 120ms;
}
.scramble__char.is-scrambling {
  color: var(--accent-secondary);
  opacity: 0.88;
}

/* ---------- SVG LINE-DRAW UNDERLINE (on section__inner > h2) ---------- */
.line-draw {
  position: relative;
  display: inline-block;
  padding-bottom: 0.18em;
}
.line-draw__svg {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 0.5em;
  overflow: visible;
  pointer-events: none;
}
.line-draw__svg path {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1200ms cubic-bezier(0.76, 0, 0.24, 1);
}
.line-draw.is-drawn .line-draw__svg path { stroke-dashoffset: 0; }

/* ---------- 3D TILT-ON-HOVER (plan cards, gallery, polaroids) ---------- */
.tilt-3d {
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  transition: transform 260ms var(--ease-out);
  will-change: transform;
}
.tilt-3d__inner {
  transform-style: preserve-3d;
}
.tilt-3d__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%),
              rgba(244,216,154,0.12) 0%,
              transparent 50%);
  opacity: 0;
  transition: opacity 260ms;
  border-radius: inherit;
}
.tilt-3d:hover .tilt-3d__shine { opacity: 1; }

/* ---------- SCROLL-VELOCITY BLUR (gallery images on fast scroll) ---------- */
@media (hover: hover) and (min-width: 900px) {
  .scroll-velocity {
    filter: blur(calc(var(--scroll-v, 0) * 0.4px)) saturate(calc(1 + var(--scroll-v, 0) * 0.008));
    transition: filter 180ms var(--ease-out);
  }
}

/* ---------- STICKY MINI-HEADER (appears after hero scroll) ---------- */
.mini-header {
  position: fixed;
  top: var(--tape-h);
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 88;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: rgba(15, 12, 9, 0.85);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow-md);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-highlight);
  text-transform: uppercase;
  opacity: 0;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 420ms;
}
.mini-header.is-visible {
  transform: translate(-50%, 16px);
  opacity: 1;
}
.mini-header__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 0 8px rgba(139,26,26,0.6);
  animation: mini-dot 1.6s ease-in-out infinite;
}
@keyframes mini-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.mini-header__cta {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--accent-primary);
  color: var(--text-inverse);
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 180ms, transform 180ms;
}
.mini-header__cta:hover { background: var(--text-highlight); transform: translateY(-1px); }
@media (max-width: 640px) {
  .mini-header { font-size: 10px; padding: 8px 12px; gap: 10px; }
  .mini-header__cta { padding: 4px 10px; }
}

/* ---------- PEEK PREVIEW (hover link for inset image thumbnail) ---------- */
.peek {
  position: relative;
}
.peek__thumb {
  position: fixed;
  pointer-events: none;
  width: 160px; height: 200px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 220ms, transform 260ms var(--ease-out);
  z-index: 9996;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--accent-primary);
  mix-blend-mode: normal;
}
.peek__thumb.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.peek__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.05);
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .flashlight-zone::after { display: none; }
  .scramble__char.is-scrambling { animation: none; }
  .line-draw__svg path { stroke-dashoffset: 0; transition: none; }
  .tilt-3d { transform: none !important; }
  .tilt-3d__shine { display: none; }
  .scroll-velocity { filter: none; }
  .mini-header { transition: opacity 200ms; }
}
