.portrait-placeholder {
  background: url('https://rlpayneconstruction.com/wp-content/uploads/2026/07/RLPayne-Office-Space-Edited.jpg') center/cover no-repeat !important;
}
.portrait-placeholder svg {
  display: none !important;
}
.portrait-frame .frame-corner {
  display: none !important;
}
.portrait-frame::after,
.portrait-frame::before,
.about-portrait::after,
.about-portrait::before {
  display: none !important;
}

/* ============================================================
   RL PAYNE — READABILITY + SCROLL 3D LAYER
   ============================================================ */

/* --- 1. Lighten the muted grey (was #4a5a78, ~2.9:1 contrast) --- */
:root {
  --muted: #93a7c9 !important;
  --dim:   #26324f !important;
}
.section-body,
.svc-desc,
.proc-desc,
.hero-sub,
.ci-val,
.ci-label,
.stat-label,
.form-note,
.badge-since,
.badge-est,
.at-city,
.svc-tag,
.area-pill,
.foot-bot,
.foot-lic,
.showcase-list li,
.foot-inner p {
  color: #a8bbd8 !important;
}
.section-body,
.svc-desc,
.proc-desc,
.hero-sub,
.showcase-list li {
  line-height: 1.75 !important;
}
.foot-inner a,
.nav-links a,
.mob-menu a {
  color: #9db0ce !important;
}
.foot-inner a:hover,
.nav-links a:hover,
.mob-menu a:hover,
.nav-links a.nav-cta {
  color: #f0f4ff !important;
}

/* --- 2. Gallery becomes the last nav item --- */
#nav-links li:nth-child(3) { order: 9; }
#mob-menu a:nth-child(3)   { order: 9; }

/* --- 3. Smooth anchor scrolling --- */
html { scroll-behavior: smooth; }

/* --- 4. 3D depth on hover (uses independent transform props so it
         never fights the scroll-driven animations below) --- */
@media (prefers-reduced-motion: no-preference) {
  .svc-grid,
  .process-grid,
  .areas-grid,
  .stats-row,
  .showcase-inner,
  .cred-row,
  .foot-inner {
    perspective: 1500px;
    perspective-origin: 50% 40%;
  }
  .svc-card,
  .proc-step,
  .stat-item,
  .area-pill,
  .cred-badge,
  .foot-soc {
    transition:
      translate .6s cubic-bezier(.16,1,.3,1),
      rotate    .6s cubic-bezier(.16,1,.3,1),
      scale     .6s cubic-bezier(.16,1,.3,1),
      box-shadow .6s cubic-bezier(.16,1,.3,1),
      border-color .5s ease;
  }
  .svc-card:hover {
    translate: 0 -10px;
    rotate: 1 -1 0 5deg;
    scale: 1.02;
    box-shadow: 0 40px 80px -24px rgba(0,0,0,.95), 0 0 34px rgba(16,85,204,.35);
  }
  .proc-step:hover {
    translate: 0 -8px;
    rotate: 0 1 0 5deg;
  }
  .stat-item:hover { translate: 0 -6px; scale: 1.04; }
  .area-pill:hover { translate: 0 -3px; scale: 1.05; }
  .cred-badge:hover { translate: 0 -4px; rotate: 1 0 0 -8deg; }
  .foot-soc:hover { translate: 0 -4px; scale: 1.12; }
}

/* --- 5. Scroll-driven 3D reveals --- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes rlpRise {
      from { opacity: .25; transform: perspective(1500px) translate3d(0, 64px, -190px) rotateX(11deg); }
      to   { opacity: 1;   transform: none; }
    }
    @keyframes rlpTilt {
      from { opacity: .3;  transform: perspective(1500px) translate3d(0, 48px, -150px) rotateX(9deg) rotateZ(-1.2deg); }
      to   { opacity: 1;   transform: none; }
    }
    @keyframes rlpTiltAlt {
      from { opacity: .3;  transform: perspective(1500px) translate3d(0, 48px, -150px) rotateX(9deg) rotateZ(1.2deg); }
      to   { opacity: 1;   transform: none; }
    }
    @keyframes rlpDrift {
      from { transform: translate3d(0, 46px, 0); }
      to   { transform: translate3d(0, -46px, 0); }
    }

    .section-tag,
    .section-title,
    .section-body,
    .services-hdr,
    .hotline,
    .form-hat,
    .areas-ticker-wrap {
      animation: rlpRise linear both;
      animation-timeline: view();
      animation-range: entry 4% entry 78%;
    }

    .svc-card,
    .proc-step,
    .stat-item,
    .area-pills,
    .cred-row,
    .showcase-list,
    .contact-items,
    .contact-form,
    .about-portrait,
    .tools-constellation {
      animation: rlpTilt linear both;
      animation-timeline: view();
      animation-range: entry 2% entry 72%;
    }
    .svc-card:nth-child(even),
    .proc-step:nth-child(even) {
      animation-name: rlpTiltAlt;
    }

    .tc-rock,
    .ambient-rock {
      animation: rlpDrift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
}
