/* World On Fire — dark theme texture, hover states, and reveal animations */

/* Film-grain texture, site-wide */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px 180px;
}

/* Cinematic ember-tinted hero overlay (replaces flat black overlay) */
.hostinger-ai-hero-opacity:after {
    background: linear-gradient(180deg, rgba(8, 7, 7, 0.55) 0%, rgba(40, 14, 6, 0.55) 55%, rgba(10, 8, 8, 0.75) 100%) !important;
}

/* Drifting ember particles inside the hero */
.hostinger-ai-hero-opacity:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
    background-image:
        radial-gradient(2.5px 2.5px at 10% 85%, rgba(255, 130, 60, 0.85), transparent 60%),
        radial-gradient(2px 2px at 28% 75%, rgba(255, 90, 30, 0.75), transparent 60%),
        radial-gradient(3px 3px at 52% 90%, rgba(255, 160, 70, 0.7), transparent 60%),
        radial-gradient(2px 2px at 74% 70%, rgba(255, 80, 20, 0.75), transparent 60%),
        radial-gradient(2.5px 2.5px at 88% 82%, rgba(255, 120, 40, 0.7), transparent 60%),
        radial-gradient(2px 2px at 40% 95%, rgba(255, 100, 30, 0.65), transparent 60%);
    animation: wofEmbers 10s linear infinite;
}

@keyframes wofEmbers {
    0% { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; opacity: 0.5; }
    50% { opacity: 1; }
    100% { background-position: 8px -260px, -6px -300px, 10px -340px, -8px -280px, 6px -320px, -4px -300px; opacity: 0.25; }
}

/* Buttons: lift + ember glow on hover */
.wp-element-button,
.wp-block-button__link {
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px -8px rgba(255, 77, 28, 0.55);
}

/* Images: subtle scale-in on hover for project/service cards */
.hostinger-ai-project-image,
.hostinger-ai-service-image,
.hostinger-ai-image {
    overflow: hidden;
    display: block;
}

.hostinger-ai-project-image img,
.hostinger-ai-service-image img,
.hostinger-ai-image img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.hostinger-ai-project-image:hover img,
.hostinger-ai-service-image:hover img,
.hostinger-ai-image:hover img {
    transform: scale(1.06);
}

/* Animated ember underline on nav + text links */
.hostinger-ai-site-navigation a,
.hostinger-ai-site-title a {
    position: relative;
}

.hostinger-ai-site-navigation a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--wp--preset--color--color-3);
    transition: width 0.3s ease;
}

.hostinger-ai-site-navigation a:hover::after {
    width: 100%;
}

/* Keyboard focus state, ember accent */
a:focus-visible,
button:focus-visible,
.wp-element-button:focus-visible {
    outline: 2px solid var(--wp--preset--color--color-3);
    outline-offset: 3px;
}

/* Headings: tighter, bolder tracking for a more industrial feel */
.hostinger-ai-title {
    letter-spacing: -0.02em;
}

/* Scroll-reveal states (classes toggled by script.js) */
.wof-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--wof-delay, 0s);
}

.wof-reveal.wof-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .wof-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hostinger-ai-hero-opacity:before {
        animation: none !important;
    }
}

/* Contact Form 7 — dark theme styling */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
    width: 100%;
    background: var(--wp--preset--color--color-1);
    border: 1px solid var(--wp--preset--color--grey);
    color: var(--wp--preset--color--light);
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 16px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--color-3);
    box-shadow: 0 0 0 3px rgba(255, 77, 28, 0.25);
}

.wpcf7 label {
    display: block;
    margin-bottom: 20px;
    color: var(--wp--preset--color--dark);
}

.wpcf7-submit {
    background: var(--wp--preset--color--color-3) !important;
    color: var(--wp--preset--color--color-2) !important;
    border: none !important;
    font-weight: 700;
    padding: 14px 40px !important;
    border-radius: 4px;
    cursor: pointer;
}

.wpcf7-submit:hover {
    filter: brightness(0.88);
}

.wpcf7-not-valid-tip {
    color: #ff8a65;
    font-size: 13px;
    margin-top: 4px;
}

.wpcf7 form.sent .wpcf7-response-output {
    border-color: var(--wp--preset--color--color-3) !important;
    color: var(--wp--preset--color--light);
}

/* ============================================
   Round 2: sticky header, cursor glow, overlays
   ============================================ */

/* Page load fade-in */
body {
    animation: wofFadeIn 0.6s ease both;
}

@keyframes wofFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
    }
}

/* Sticky, blurring header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header.wof-scrolled {
    background-color: rgba(10, 10, 12, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px -14px rgba(0, 0, 0, 0.7);
}

/* Back-to-top button */
.wof-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--wp--preset--color--color-3);
    color: var(--wp--preset--color--color-2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 90;
    box-shadow: 0 6px 20px -6px rgba(255, 77, 28, 0.5);
}

.wof-to-top.wof-shown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.wof-to-top:hover {
    box-shadow: 0 10px 28px -6px rgba(255, 77, 28, 0.8);
    transform: translateY(-3px);
}

.wof-to-top svg {
    width: 20px;
    height: 20px;
}

/* Cursor-reactive glow inside the hero */
.hostinger-ai-hero-opacity {
    --wof-glow-x: 50%;
    --wof-glow-y: 40%;
}

.hostinger-ai-hero-opacity::after {
    background:
        radial-gradient(600px circle at var(--wof-glow-x) var(--wof-glow-y), rgba(255, 90, 30, 0.18), transparent 55%),
        linear-gradient(180deg, rgba(8, 7, 7, 0.55) 0%, rgba(40, 14, 6, 0.55) 55%, rgba(10, 8, 8, 0.75) 100%) !important;
    transition: background 0.15s ease-out;
}

/* Custom ember scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--wp--preset--color--color-2);
}

::-webkit-scrollbar-thumb {
    background: var(--wp--preset--color--color-3);
    border-radius: 6px;
    border: 2px solid var(--wp--preset--color--color-2);
}

html {
    scrollbar-color: var(--wp--preset--color--color-3) var(--wp--preset--color--color-2);
    scrollbar-width: thin;
}

/* Text selection */
::selection {
    background: var(--wp--preset--color--color-3);
    color: var(--wp--preset--color--color-2);
}

/* Outline-style button: fills with ember on hover */
.is-style-outline .wp-block-button__link {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.is-style-outline .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--color-3) !important;
    color: var(--wp--preset--color--color-2) !important;
}

/* Button active/press feedback */
.wp-element-button:active,
.wp-block-button__link:active {
    transform: translateY(-1px) scale(0.98);
}

/* Portfolio / service image hover overlay */
.hostinger-ai-project-image,
.hostinger-ai-service-image {
    position: relative;
}

.hostinger-ai-project-image::before,
.hostinger-ai-service-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 8, 8, 0) 40%, rgba(10, 8, 8, 0.85) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.hostinger-ai-project-image::after,
.hostinger-ai-service-image::after {
    content: "+";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    background: var(--wp--preset--color--color-3);
    color: var(--wp--preset--color--color-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 2;
    pointer-events: none;
}

.hostinger-ai-project-image:hover::before,
.hostinger-ai-service-image:hover::before {
    opacity: 1;
}

.hostinger-ai-project-image:hover::after,
.hostinger-ai-service-image:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Eyebrow / kicker labels above section headings */
.wof-eyebrow {
    display: inline-block;
    color: #ff7043;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Numbered step badges */
.wof-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--wp--preset--color--color-3);
    color: var(--wp--preset--color--color-3);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Mobile nav overlay, dark themed */
.wp-block-navigation__responsive-container.is-menu-open {
    background-color: var(--wp--preset--color--color-2) !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    color: var(--wp--preset--color--light) !important;
    font-size: 20px;
}

.wp-block-navigation__responsive-container-close,
.wp-block-navigation__responsive-container-open {
    color: var(--wp--preset--color--light) !important;
}

@media (prefers-reduced-motion: reduce) {
    .hostinger-ai-hero-opacity::after {
        transition: none;
    }
}
