/* =====================================================
   NICK HANDYMAN — ANIMATION LAYER
===================================================== */

/* ══════════════════════════════════════════════════════
   3D HERO CUBE
══════════════════════════════════════════════════════ */
.hero-cube-wrap {
    display: none; /* mobile: hidden */
    position: absolute;
    right: 6%;
    top: 50%;
    z-index: 3;
    animation: cubeBob 5s ease-in-out infinite;
}

@keyframes cubeBob {
    0%, 100% { transform: translateY(-50%) translateY(0px);    }
    50%       { transform: translateY(-50%) translateY(-16px);  }
}

@media (min-width: 1080px) {
    .hero-cube-wrap { display: block; }
}

/* Scene — sets perspective */
.cube-scene {
    width: 210px;
    height: 210px;
    perspective: 720px;
    perspective-origin: 50% 40%;
}

/* The cube itself */
.cube {
    width: 210px;
    height: 210px;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 16s linear infinite;
}

.cube:hover {
    animation-play-state: paused;
}

@keyframes cubeRotate {
    from { transform: rotateX(-22deg) rotateY(0deg);   }
    to   { transform: rotateX(-22deg) rotateY(360deg); }
}

/* All six faces */
.cube-face {
    position: absolute;
    width: 210px;
    height: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(10, 24, 48, 0.82);
    border: 1px solid rgba(212, 146, 0, 0.38);
    border-radius: 10px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow:
        inset 0 0 40px rgba(212,146,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Face positions (half of 210px = 105px) */
.cube-face--front  { transform: rotateY(  0deg) translateZ(105px); }
.cube-face--back   { transform: rotateY(180deg) translateZ(105px); }
.cube-face--right  { transform: rotateY( 90deg) translateZ(105px); }
.cube-face--left   { transform: rotateY(-90deg) translateZ(105px); }
.cube-face--top    { transform: rotateX( 90deg) translateZ(105px); }
.cube-face--bottom { transform: rotateX(-90deg) translateZ(105px); }

/* Icon inside each face */
.cf-icon {
    color: var(--gold);
    filter: drop-shadow(0 0 10px rgba(212,146,0,0.5));
    transition: filter 0.3s ease;
}

.cf-icon svg {
    stroke: #d49200;
}

/* Label */
.cf-label {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(212, 146, 0, 0.80);
}

/* Ground glow beneath cube */
.cube-glow-ring {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 24px;
    background: radial-gradient(ellipse, rgba(212,146,0,0.30) 0%, transparent 72%);
    filter: blur(6px);
    border-radius: 50%;
}

/* ── Hero canvas ───────────────────────────────────── */
#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ── Hero floating glow orbs ───────────────────────── */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.hero-orb-1 {
    width: 560px; height: 560px;
    right: -140px; top: -140px;
    background: radial-gradient(circle, rgba(212,146,0,0.11) 0%, transparent 62%);
    animation: orbFloat 11s ease-in-out infinite;
}

.hero-orb-2 {
    width: 380px; height: 380px;
    left: 3%; bottom: -90px;
    background: radial-gradient(circle, rgba(16,40,80,0.55) 0%, transparent 65%);
    animation: orbFloat 14s ease-in-out infinite reverse;
    animation-delay: -6s;
}

.hero-orb-3 {
    width: 240px; height: 240px;
    left: 52%; top: 22%;
    background: radial-gradient(circle, rgba(212,146,0,0.07) 0%, transparent 65%);
    animation: orbFloat 9s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0)     scale(1);    }
    50%       { transform: translateY(-30px) scale(1.05); }
}

/* ── Cursor spotlight (desktop) ────────────────────── */
#anim-spotlight {
    position: fixed;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,146,0,0.045) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    will-change: transform;
    top: 0; left: 0;
}

/* ── Ripple on click ───────────────────────────────── */
.btn-gold,
.btn-outline {
    position: relative;
    overflow: hidden;
}

.anim-ripple {
    position: absolute;
    width: 6px; height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: animRipple 0.65s ease-out forwards;
    pointer-events: none;
}

@keyframes animRipple {
    to { transform: translate(-50%, -50%) scale(130); opacity: 0; }
}

/* ── 3D tilt — preserve transform context ──────────── */
.service-card,
.why-card {
    transform-style: preserve-3d;
    will-change: transform;
}

/* ── Enhanced service card hover glow ──────────────── */
.service-card:hover {
    box-shadow:
        0 22px 64px rgba(0,0,0,0.60),
        0 0 0 1px rgba(212,146,0,0.30),
        0 0 44px rgba(212,146,0,0.08) !important;
}

/* ── Enhanced why card hover ───────────────────────── */
.why-card:hover {
    box-shadow:
        0 18px 52px rgba(0,0,0,0.55),
        0 0 0 1px rgba(212,146,0,0.24) !important;
}

/* ── Contact cards ─────────────────────────────────── */
.contact-card {
    transition: transform 0.35s cubic-bezier(0.23,1,0.32,1),
                box-shadow 0.35s ease;
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 56px rgba(0,0,0,0.55),
        0 0 0 1px rgba(212,146,0,0.22);
}

/* ── Hero headline gradient shimmer ────────────────── */
.hero-headline {
    background: linear-gradient(120deg, #ffffff 0%, #f8e8c0 40%, #ffffff 65%, #fdf6e0 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: headlineShimmer 7s linear infinite;
}

@keyframes headlineShimmer {
    0%   { background-position: 0%   center; }
    100% { background-position: 250% center; }
}

/* ── Trust badges ──────────────────────────────────── */
.trust-badge {
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease,
                transform 0.25s ease;
}

.trust-badge:hover {
    background: rgba(212,146,0,0.12);
    border-color: rgba(212,146,0,0.38);
    color: var(--cream);
    transform: translateY(-1px);
}

/* ── Eyebrow pulse dot ─────────────────────────────── */
.eyebrow-gold::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--gold);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    animation: dotPulse 2.2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(212,146,0,0.5);
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(212,146,0,0.55); }
    50%       { box-shadow: 0 0 0 6px rgba(212,146,0,0);    }
}

/* ── Section title underline animate on scroll ─────── */
.section-title::after {
    transition: width 0.7s cubic-bezier(0.23,1,0.32,1) 0.3s;
    width: 0 !important;
}

.section-title.st-visible::after {
    width: 52px !important;
}

/* ── Gallery category entrance ─────────────────────── */
.gallery-category {
    will-change: opacity, transform;
}

/* ── Review card entrance ──────────────────────────── */
.review-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,146,0,0.18);
}

/* ── Pricing rows subtle highlight ─────────────────── */
.pricing-row {
    transition: background 0.25s ease, padding-left 0.25s ease;
}

.pricing-row:hover {
    background: rgba(212,146,0,0.06);
    padding-left: 10px;
}

/* ── Map section fade ──────────────────────────────── */
.contact-map-wrap {
    will-change: opacity, transform;
}

/* ── Footer subtle entrance ────────────────────────── */
.footer {
    will-change: opacity, transform;
}
