/* drukbaert site overrides */

/* Honeypot (extra hard hide if helmet css strips inline) */
input[name="website"] { position: absolute !important; left: -9999px !important; }

/* Form alert tweaks */
#form-alert.alert { display: none; margin-top: 1rem; }
#form-alert.alert.alert-success,
#form-alert.alert.alert-danger { display: block; }

/* Force every tile (portfolio + techniques) into a uniform 3:2 frame
   so layouts don't break with mixed aspect-ratio source images. */
#works-grid .work-image,
#tech-grid .work-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f5f5f5;
}

#works-grid .work-image > img,
#tech-grid .work-image > img,
#tech-grid .work-image > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1) {
    #works-grid .work-image,
    #tech-grid .work-image {
        height: 0;
        padding-bottom: 66.6667%;
    }
}

/* Video tile (acts like an <a>) */
.video-tile { cursor: pointer; display: block; }
.video-tile .video-play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 28px;
    line-height: 64px;
    text-align: center;
    pointer-events: none;
    transition: background .2s, transform .2s;
    padding-left: 6px; /* optical centering of the triangle */
    box-sizing: border-box;
}
.video-tile:hover .video-play-icon,
.video-tile:focus .video-play-icon {
    background: rgba(0,0,0,.8);
    transform: translate(-50%, -50%) scale(1.05);
}

/* Video lightbox */
.db-video-lightbox {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.9);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999;
    padding: 2vh 2vw;
}
.db-video-lightbox video {
    max-width: 100%;
    max-height: 96vh;
    width: auto;
    height: auto;
    background: #000;
    box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.db-video-lightbox .db-close {
    position: absolute;
    top: 16px; right: 24px;
    width: 44px; height: 44px;
    border: 0; background: transparent;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}
.db-video-lightbox .db-close:hover { color: #ccc; }

/* Make form button show busy state */
.form-contact-submit.is-loading .loading-icon {
    display: inline-block;
    margin-right: .5em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    width: 1em; height: 1em;
    animation: db-spin .8s linear infinite;
    vertical-align: middle;
}
@keyframes db-spin { to { transform: rotate(360deg); } }
