/*
Theme Name: Amaze Rocks
Theme URI: https://www.amaze.rocks/
Author: Amaze Rocks
Description: Faithful classic WordPress theme adapted from the company's original single-page site. Requires the Amaze Games Catalog plugin for game cards.
Version: 0.3.1
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: amaze-rocks
*/

/* The original design lives in legacy-style.css. These are additions for game cards. */
.amaze-game-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; margin: 48px 0 5px; }
.amaze-game-card { min-width: 0; background: rgba(9,9,14,.90); border: 1px solid rgba(255,255,255,.15); border-radius: 9px; overflow: hidden; box-shadow: 0 12px 38px rgba(0,0,0,.28); transition: transform .2s ease, border-color .2s ease; }
.amaze-game-card:hover, .amaze-game-card:focus-within { transform: translateY(-4px); border-color: rgba(255,255,255,.48); }
.amaze-game-link { display: block; color: #fff !important; height: 100%; text-decoration: none !important; }
.amaze-game-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #1b1e25; display: flex; align-items: center; justify-content: center; }
.amaze-game-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s ease; }
.amaze-game-card:hover img { transform: scale(1.035); }
.amaze-game-placeholder { font-family: Montserrat,Arial,sans-serif; color: rgba(255,255,255,.75); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.amaze-game-copy { padding: 22px 24px 24px; }
.amaze-game-copy h3 { font-family: Montserrat,Arial,sans-serif; color: #fff; font-size: 1.25rem; line-height: 1.35; margin: 0 0 10px; }
.amaze-game-copy p { color: rgba(255,255,255,.76); font-size: .95rem; line-height: 1.55; margin: 0 0 15px; }
.amaze-game-copy { display: flex; flex-direction: column; flex-grow: 1; }
.amaze-game-card { display: flex; flex-direction: column; }
.amaze-game-store-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 10px; margin-top: auto; padding-top: 12px; }
.amaze-game-store-btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 43px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.52); border-radius: 5px; color: #fff !important; background: rgba(255,255,255,.08); font-size: .86rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none !important; transition: background .2s ease, border-color .2s ease; }
.amaze-game-store-btn:hover,.amaze-game-store-btn:focus-visible { background: rgba(255,255,255,.22); border-color: #fff; color: #fff !important; }
.amaze-game-store-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.amaze-game-store-pending { display: inline-block; color: rgba(255,255,255,.65); font-size: .87rem; font-weight: 700; letter-spacing: .02em; margin-top: auto; padding-top: 12px; }
.amaze-hp { position: absolute !important; left: -9999px !important; }
.amaze-form-notice { padding: 14px 20px; border-radius: 5px; background: #172b2b; border: 1px solid #52a9a5; color: #fff; }
.amaze-content-wrap { min-height: 55vh; padding: 150px 0 90px; background: #111; color: #eee; }
.amaze-content-wrap h1,.amaze-content-wrap h2,.amaze-content-wrap h3 { color: #fff; }
.amaze-content-wrap a { color: #e8d9e8; }
.amaze-single-cover img { width: 100%; height: auto; max-height: 550px; object-fit: cover; margin: 15px 0 30px; }
@media (max-width: 991px) { .amaze-game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; } }
@media (max-width: 575px) { .amaze-game-grid { grid-template-columns: 1fr; margin-top: 32px; } }
@media (prefers-reduced-motion: reduce) { .amaze-game-card,.amaze-game-cover img { transition: none; } }

/* Amaze Rocks: restore the animated "Lost in" headline when the legacy
   Morphext plugin is unavailable. If the original plugin initializes,
   it adds .morphext and takes over the animation automatically. */
.text-rotater .t-rotate:not(.morphext):not(.plugin-typed-init) {
    display: inline-block;
    backface-visibility: visible;
    transform-origin: 50% 50%;
    animation: amaze-lost-in-flip 3500ms ease-out infinite;
}

@keyframes amaze-lost-in-flip {
    0%   { transform: perspective(400px) rotateX(90deg); opacity: 0; }
    11%  { transform: perspective(400px) rotateX(-20deg); opacity: 1; }
    17%  { transform: perspective(400px) rotateX(10deg); }
    23%  { transform: perspective(400px) rotateX(-5deg); }
    29%, 100% { transform: perspective(400px) rotateX(0deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .text-rotater .t-rotate:not(.morphext):not(.plugin-typed-init) {
        animation: none;
        transform: none;
        opacity: 1;
    }
}

/* Keep the rotating headline on its own centered line on narrow and wide screens.
   Combined with the fallback animation above; matches the tested Customizer fix. */
.text-rotater .t-rotate {
    display: block !important;
    width: 100%;
    text-align: center;
}

/* Cloudflare Turnstile in the Contact Us Bootstrap modal */
.amaze-turnstile-field { margin-top: 12px; }
.amaze-turnstile-field > label { display: block; margin-bottom: 7px; }
#amaze-turnstile-widget { min-height: 65px; max-width: 100%; overflow: visible; }
.amaze-turnstile-note { display: block; color: rgba(255,255,255,.72); margin-top: 5px; }
