/* =============================================================
   Liquid Distortion Hero — Stylesheet
   ============================================================= */

/* Base wrapper */
.ldh-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    display: block;
}

/* Canvas fills wrapper */
.ldh-canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Content overlay */
.ldh-content {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    padding: 2rem 3rem;
    box-sizing: border-box;
}

.ldh-content * {
    pointer-events: auto;
}

/* ---- Layout variants ---------------------------------------- */
.ldh-layout--center .ldh-content {
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ldh-layout--left .ldh-content {
    left: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.ldh-layout--right .ldh-content {
    right: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
}

.ldh-layout--bottom .ldh-content {
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    padding-bottom: 4rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

/* ---- Typography --------------------------------------------- */
.ldh-heading {
    margin: 0 0 .75rem;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .4);
}

.ldh-subheading {
    margin: 0 0 1.5rem;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, .85);
    line-height: 1.6;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .3);
}

/* ---- Button ------------------------------------------------- */
.ldh-btn {
    display: inline-block;
    padding: .75rem 2rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .45);
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .05em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .25s, transform .2s, box-shadow .25s;
    cursor: pointer;
}

.ldh-btn:hover {
    background: rgba(255, 255, 255, .35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.ldh-btn:active {
    transform: translateY(0);
}

/* ---- Gyro overlay ------------------------------------------- */
.ldh-gyro-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: opacity .5s ease, visibility .5s ease;
}

.ldh-gyro-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ldh-gyro-btn {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 2.2rem;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all .25s;
    outline: none;
}

.ldh-gyro-btn:hover {
    background: rgba(255, 255, 255, .3);
    transform: scale(1.05);
}

.ldh-gyro-subtitle {
    color: rgba(255, 255, 255, .7);
    font-size: .85rem;
    text-align: center;
    max-width: 240px;
}

/* ---- Debug overlay ------------------------------------------ */
.ldh-debug-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, .75);
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.7;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 1000;
    pointer-events: none;
    border: 1px solid rgba(0, 255, 0, .2);
}

/* ---- SEO hidden content ------------------------------------- */
.ldh-seo-content {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ---- Fallback image ----------------------------------------- */
.ldh-wrapper > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Reduced motion ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .ldh-wrapper canvas {
        animation: none !important;
    }

    .ldh-gyro-overlay {
        display: none;
    }
}

/* ---- Mobile ------------------------------------------------- */
@media (max-width: 768px) {
    .ldh-layout--left .ldh-content,
    .ldh-layout--right .ldh-content {
        left: 0;
        right: 0;
        width: 100%;
        top: auto;
        bottom: 0;
        padding: 2rem 1.5rem 5rem;
        background: linear-gradient(transparent, rgba(0, 0, 0, .65));
        text-align: left;
        align-items: flex-start;
    }

    .ldh-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .ldh-heading {
        font-size: 1.8rem;
    }

    .ldh-subheading {
        font-size: .95rem;
    }
}
