/* ============================================================
   IN-HOUSE TEAM PAGE — ANIMATED LEGAL SCALES
   (Safe + isolated. Does NOT affect about.css or any other page)
   ============================================================ */

/* Position container */
.animated-scale {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* SVG Sizing */
.scale-svg {
    width: 320px;
    height: 320px;
    stroke-linecap: round;
    overflow: visible;
    
    /* Starting invisible for draw animation */
    stroke-dasharray: 500;
    stroke-dashoffset: 500;

    animation: drawScale 2.4s ease-out forwards,
               glowPulse 3.5s ease-in-out infinite 2.4s,
               subtleFloat 5s ease-in-out infinite;
}

/* Golden stroke style */
.scale-stroke {
    stroke: #e5c278;
    stroke-width: 3;
    fill: none;
    filter: drop-shadow(0 0 8px rgba(229,194,120,0.25));
}

/* Draw-on animation */
@keyframes drawScale {
    0%   { stroke-dashoffset: 500; }
    100% { stroke-dashoffset: 0; }
}

/* Gentle glow pulsing */
@keyframes glowPulse {
    0%   { filter: drop-shadow(0 0 6px rgba(229,194,120,0.2)); }
    50%  { filter: drop-shadow(0 0 16px rgba(229,194,120,0.4)); }
    100% { filter: drop-shadow(0 0 6px rgba(229,194,120,0.2)); }
}

/* Soft floating motion */
@keyframes subtleFloat {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}



/* ===========================
   HERO ANIMATION — VERSION E
   =========================== */

.team-hero-animation {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto;
}

/* -------- HALO RING -------- */
.halo-ring {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 2px solid rgba(255, 220, 150, 0.25);
    box-shadow: 0 0 25px rgba(255, 220, 150, 0.35);
    animation: haloRotate 14s linear infinite;
}

@keyframes haloRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* -------- PARTICLES -------- */
.particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 220, 150, 0.7);
    border-radius: 50%;
    animation: drift 6s linear infinite;
    opacity: 0.7;
}

.particles span:nth-child(1) { top: 20%; left: 40%; animation-duration: 7s; }
.particles span:nth-child(2) { top: 70%; left: 60%; animation-duration: 9s; }
.particles span:nth-child(3) { top: 45%; left: 80%; animation-duration: 8s; }
.particles span:nth-child(4) { top: 30%; left: 20%; animation-duration: 10s; }
.particles span:nth-child(5) { top: 80%; left: 35%; animation-duration: 12s; }
.particles span:nth-child(6) { top: 55%; left: 15%; animation-duration: 11s; }

@keyframes drift {
    0% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-10px) scale(1.2); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 0.5; }
}

/* -------- SCALES SVG -------- */
.scale-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: visible;
    animation: swing 6s ease-in-out infinite;
}

.scale-line {
    stroke: #e5c278;
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 260;
    stroke-dashoffset: 260;
    animation: draw 2.4s ease forwards, glowPulse 3s ease-in-out infinite 2.4s;
}

/* Draw line animation */
@keyframes draw {
    to { stroke-dashoffset: 0; }
}

/* Glow effect */
@keyframes glowPulse {
    0% { filter: drop-shadow(0 0 2px #e5c278); }
    50% { filter: drop-shadow(0 0 10px #ffe5b0); }
    100% { filter: drop-shadow(0 0 2px #e5c278); }
}

/* Gentle swing */
@keyframes swing {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(2deg); }
    100% { transform: rotate(0deg); }
}



/* ================= HERO SCALES ANIMATION (SAFE / PAGE-SPECIFIC) ================= */

.animated-scales-wrapper {
    width: 360px;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: scalesFloat 6s ease-in-out infinite;
}

.animated-scales-svg {
    width: 240px;
    height: 240px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Gold stroke */
.scale-line,
.scale-plate {
    stroke: #e5c278;
    stroke-width: 4;
    fill: none;
    stroke-dasharray: 260;
    stroke-dashoffset: 260;
    animation: drawStroke 2.2s ease forwards;
}

/* Glow */
.animated-scales-svg .scale-line,
.animated-scales-svg .scale-plate {
    filter: drop-shadow(0 0 6px rgba(229, 194, 120, 0.45));
}

/* Plate tipping animation */
.scale-plate-left {
    animation: drawStroke 2.2s ease forwards, tipLeft 4s ease-in-out infinite 2.2s;
}
.scale-plate-right {
    animation: drawStroke 2.2s ease forwards, tipRight 4s ease-in-out infinite 2.2s;
}

/* ================= KEYFRAMES ================= */

/* stroke drawing */
@keyframes drawStroke {
    from { stroke-dashoffset: 260; opacity: 0; }
    to   { stroke-dashoffset: 0; opacity: 1; }
}

/* soft floating */
@keyframes scalesFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* tipping plates */
@keyframes tipLeft {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

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


/* ================= HERO SCALES — VERSION XL ================= */

.animated-scales-wrapper {
    width: 620px;           /* XL width */
    height: 460px;          /* XL height */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: scalesFloat 6s ease-in-out infinite;
}

.animated-scales-svg {
    width: 520px;           /* increased from 380 */
    height: 520px;          /* perfect circle scale */
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Strong gold stroke */
.scale-line,
.scale-plate {
    stroke: #e5c278;
    stroke-width: 7.5;      /* THICK premium stroke */
    fill: none;
    filter: drop-shadow(0 0 18px rgba(229, 194, 120, 0.55));
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    animation: drawStrokeXL 2.4s ease forwards;
}

/* Strong glow */
.animated-scales-svg .scale-line,
.animated-scales-svg .scale-plate {
    filter: drop-shadow(0 0 20px rgba(229, 194, 120, 0.55));
}

/* Plate tilt */
.scale-plate-left {
    animation:
        drawStrokeXL 2.4s ease forwards,
        tipLeftXL 4.5s ease-in-out infinite 2.4s;
}
.scale-plate-right {
    animation:
        drawStrokeXL 2.4s ease forwards,
        tipRightXL 4.5s ease-in-out infinite 2.4s;
}

/* ================= KEYFRAMES ================= */

@keyframes drawStrokeXL {
    from { stroke-dashoffset: 420; opacity: 0; }
    to   { stroke-dashoffset: 0; opacity: 1; }
}

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

@keyframes tipLeftXL {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(16px); }  /* stronger tilt */
}

@keyframes tipRightXL {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-16px); } /* stronger tilt */
}


/* ================= IN-HOUSE HERO OVERRIDES ================= */
.inhouse-hero {
    padding-top: 140px !important;
    padding-bottom: 160px !important;
}

/* Optional: smoother spacing on mobile */
@media (max-width: 900px) {
    .inhouse-hero {
        padding-top: 120px !important;
        padding-bottom: 180px !important;
    }
}

@media (max-width: 600px) {
    .inhouse-hero {
        padding-top: 90px !important;
        padding-bottom: 140px !important;
    }
}