/* ==========================================================================
   Son Daven Inspired Editorial Motion, Ambient Parallax & Typography Effects
   Tailored for JPEGstudio (#050508 dark + #FF6B00 / #A89474 accents)
   ========================================================================== */

:root {
  --sd-bg-dark: #050508;
  --sd-bronze: #a89474;
  --sd-orange: #ff6b00;
  --sd-umber: #2c2824;
  --sd-px: 0;
  --sd-py: 0;
  --sd-scroll-y: 0px;
}

/* 1. Ambient Background Layer (Orbs + Scanline Grid + Pointer/Scroll Parallax) */
.sd-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(168, 148, 116, 0.11), transparent 46%),
    radial-gradient(circle at 18% 82%, rgba(255, 107, 0, 0.08), transparent 48%);
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

.sd-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.48;
  transform: translate3d(
    calc(var(--sd-px) * var(--depth, 18px)),
    calc(var(--sd-py) * var(--depth, 18px) + var(--sd-scroll-y) * var(--s-depth, -0.05)),
    0
  );
}

.sd-orb--primary {
  --depth: 22px;
  --s-depth: -0.06;
  width: 460px;
  height: 460px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(168, 148, 116, 0.32), rgba(255, 107, 0, 0.1) 55%, transparent 72%);
  animation: sdOrbFloatA 16s ease-in-out infinite alternate;
}

.sd-orb--secondary {
  --depth: -16px;
  --s-depth: 0.05;
  width: 400px;
  height: 400px;
  bottom: -110px;
  left: -90px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.18), rgba(92, 78, 58, 0.28) 55%, transparent 72%);
  animation: sdOrbFloatB 20s ease-in-out infinite alternate;
}

.sd-scan-grid {
  position: absolute;
  inset: -40px 0;
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(
      to right,
      rgba(168, 148, 116, 0.04) 1px,
      transparent 1px
    );
  background-size: 100% 4px, 96px 96px;
  transform: translate3d(0, calc(var(--sd-scroll-y) * -0.04), 0);
}

@keyframes sdOrbFloatA {
  0%   { scale: 1; }
  100% { scale: 1.14; }
}

@keyframes sdOrbFloatB {
  0%   { scale: 1.08; }
  100% { scale: 0.94; }
}

/* 2. Masked Line Reveal Typography */
.sd-reveal-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.sd-reveal-line > span {
  display: inline-block;
  transform: translateY(108%);
  opacity: 0;
  transition:
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.65s ease;
  will-change: transform, opacity;
}

.is-sd-visible .sd-reveal-line > span {
  transform: translateY(0);
  opacity: 1;
}

.sd-reveal-line:nth-child(2) > span { transition-delay: 0.09s; }
.sd-reveal-line:nth-child(3) > span { transition-delay: 0.18s; }
.sd-reveal-line:nth-child(4) > span { transition-delay: 0.27s; }

/* 3. Scanline / Editorial Display Title Accent */
.sd-scan-title {
  position: relative;
}

.sd-scan-title::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 45%,
    rgba(168, 148, 116, 0.16) 50%,
    transparent 55%
  );
  background-size: 100% 8px;
  opacity: 0.38;
  mix-blend-mode: screen;
}

/* 4. Kinetic Editorial Marquee Strip */
.sd-kinetic-strip {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(168, 148, 116, 0.22);
  border-bottom: 1px solid rgba(168, 148, 116, 0.22);
  background: rgba(12, 12, 16, 0.65);
  backdrop-filter: blur(6px);
  padding: 0.95rem 0;
  margin: 0;
  position: relative;
  z-index: 2;
}

.sd-kinetic-track {
  display: inline-flex;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(0.8rem, 1.25vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sd-bronze, #a89474);
  animation: sdMarquee 32s linear infinite;
  will-change: transform;
}

.sd-kinetic-strip:hover .sd-kinetic-track {
  animation-play-state: paused;
}

.sd-kinetic-track strong {
  color: #ffffff;
  font-weight: 600;
}

.sd-kinetic-dot {
  color: var(--sd-orange, #ff6b00);
  margin: 0 1.25rem;
}

@keyframes sdMarquee {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* 5. Tactile Portfolio Card Image Zoom Frame */
.sd-card-zoom {
  overflow: hidden;
}

.sd-card-zoom img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  will-change: transform;
}

.sd-card-zoom:hover img {
  transform: scale(1.035);
}

@media (prefers-reduced-motion: reduce) {
  .sd-orb,
  .sd-scan-grid {
    animation: none !important;
    transform: none !important;
  }
  .sd-reveal-line > span {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
  .sd-kinetic-track {
    animation: none !important;
  }
}
