/* Reset defaults and secure phone viewport limits */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* SHAPE CANVAS BACKGROUND WRAPPER */
#shape-canvas {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0; 
    pointer-events: none; 
}

/* Header Base Grid Layout */
#site-header {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: transparent;
}

.header-logo {
    max-height: 100%;
    width: auto;
    max-width: 90%;
    object-fit: contain;
}

/* Full Width Stack Container */
#button-stack {
    position: relative;
    z-index: 1; 
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 20px 10px 40px 10px;
    gap: 40px;
    align-items: center;
}

.dog-row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CARTRIDGE BADGE BASE ELEMENT */
.dog-btn {
    position: relative;
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    width: 95%; 
    max-width: 450px; 
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;

    --base-tilt: 0deg;
    --base-shift: 0px;

    animation: gentleWiggle 4s ease-in-out infinite alternate;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease;
}

/* Full Size Background Image Constraint Map */
.dog-btn img {
    width: 100%; 
    height: auto;
    display: block;
    object-fit: contain;
    background: transparent !important;
    opacity: 0.95;
    pointer-events: none;
}

/* DEAD CENTER OVERLAID TEXT STICKER STYLE */
.btn-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    font-size: 2.5rem; 
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none; 
    
    /* THE REAL SECRET: This layer acts EXCLUSIVELY as the massive white background outline shield */
    color: #ffffff;
    -webkit-text-stroke: 8px #ffffff; 
    filter: drop-shadow(0px 3px 4px rgba(0,0,0,0.2));
}

/* THE FLOATING FOREGROUND CLONE layer: 
   This automatically reads the data attribute, aligns directly on top, 
   forces zero stroke, and showcases your raw vibrant color unhindered.
*/
.btn-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: var(--btn-color);
    -webkit-text-stroke: 0px transparent !important;
}

/* THE FONT ROUTER ENGINE (Maps down to both the base shadow element and clone element) */
.dog-btn[style*="--btn-font-token: comicsans"] .btn-text {
    font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive, sans-serif !important;
}
.dog-btn[style*="--btn-font-token: times"] .btn-text {
    font-family: "Times New Roman", Times, serif !important;
}
.dog-btn[style*="--btn-font-token: impact"] .btn-text {
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif !important;
}

/* Dynamic Interaction Profiles */
.dog-btn:hover {
    filter: drop-shadow(0px 15px 15px rgba(0,0,0,0.15));
}

.dog-btn:active {
    transform: scale(0.9) rotate(calc(var(--base-tilt) + 4deg)) !important;
    filter: drop-shadow(0px 4px 4px rgba(0,0,0,0.2));
    transition: transform 0.05s ease;
}

/* BRAND TAGLINE FOOTER CONTAINER */
#site-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 10px 60px 10px; 
    background: transparent;
}

.tagline {
    position: relative;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.6rem;
    font-weight: 700;
    font-style: italic; 
    text-align: center;
    letter-spacing: 1px;
    color: #ffffff;
    -webkit-text-stroke: 4px #ffffff;
}

.tagline::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    color: #111111;
    -webkit-text-stroke: 0px transparent !important;
}

/* CSS Hardware Engine Animation Mapping Loop */
@keyframes gentleWiggle {
    0% { transform: translateX(var(--base-shift)) rotate(var(--base-tilt)) scale(1); }
    50% { transform: translateX(calc(var(--base-shift) + 6px)) rotate(calc(var(--base-tilt) + 2deg)) scale(1.02); }
    100% { transform: translateX(calc(var(--base-shift) - 6px)) rotate(calc(var(--base-tilt) - 1deg)) scale(0.99); }
}

/* Compact Smartphone Display Overrides */
@media (max-width: 600px) {
    #site-header { 
        height: 130px; 
    }
    #button-stack { 
        gap: 25px; 
    }
    .dog-btn { 
        width: 85%; 
    }
    .btn-text { 
        font-size: 1.6rem; 
        -webkit-text-stroke: 6px #ffffff; /* Slightly tighter backdrop shield footprint on tiny phone viewports */
    }
    .tagline {
        font-size: 1.25rem;
        -webkit-text-stroke: 3px #ffffff;
    }
}
