/* ============================================================
   ERW ESSENTIALS — ANIMATION & INTERACTION ENHANCEMENTS
   GSAP controls coordinated entrances and scroll reveals.
   CSS handles small, lightweight hover and focus states.
   ============================================================ */

:root {
    --erw-motion-quick: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
    --erw-motion-smooth: 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Accessible keyboard focus that matches the brand. */
:where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid rgba(245, 166, 35, 0.9);
    outline-offset: 3px;
}

.erw-search__field:focus-visible {
    outline: none;
    outline-offset: 0;
}

/* Animation targets remain visible until JavaScript initializes. */
.erw-motion-ready [data-erw-reveal],
.erw-motion-ready [data-erw-stagger] > *,
.erw-motion-ready [data-erw-intro-item],
.erw-motion-ready [data-erw-hero-item],
.erw-motion-ready [data-erw-hero-heading] > span,
.erw-motion-ready [data-erw-hero-buttons] > *,
.erw-motion-ready [data-erw-hero-mini] > *,
.erw-motion-ready [data-erw-mobile-item] {
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* ============================================================
   HEADER POLISH
============================================================ */
.erw-header {
    transition: box-shadow var(--erw-motion-smooth);
}

.erw-header.is-scrolled {
    box-shadow: 0 14px 38px rgba(7, 14, 26, 0.22);
}

.erw-logo__mark em,
.erw-logo__tag {
    transition: color var(--erw-motion-quick),
                letter-spacing var(--erw-motion-smooth),
                text-shadow var(--erw-motion-smooth);
}

.erw-logo:hover .erw-logo__mark em {
    text-shadow: 0 0 22px rgba(245, 166, 35, 0.38);
}

.erw-logo:hover .erw-logo__tag {
    color: rgba(255, 255, 255, 0.62);
    letter-spacing: 0.2em;
}

.erw-search {
    transform: translateZ(0);
    transition: border-color var(--erw-motion-quick),
                box-shadow var(--erw-motion-quick),
                transform var(--erw-motion-quick);
}

.erw-search:focus-within {
    transform: translateY(-1px);
}

.erw-search__btn,
.erw-nav__all,
.erw-news__btn,
.erw-social a {
    transform: translateZ(0);
}

.erw-search__btn:active,
.erw-nav__all:active,
.erw-news__btn:active,
.erw-social a:active {
    transform: scale(0.97);
}

.erw-acct__icon-wrap,
.erw-nav__quote svg,
.erw-cart__badge {
    transition: transform var(--erw-motion-smooth),
                border-color var(--erw-motion-quick),
                background-color var(--erw-motion-quick),
                color var(--erw-motion-quick),
                box-shadow var(--erw-motion-smooth);
}

.erw-acct__item:hover .erw-acct__icon-wrap,
.erw-acct__item:focus-visible .erw-acct__icon-wrap {
    transform: translateY(-2px);
    color: var(--erw-gold);
    border-color: var(--erw-gold);
    background: rgba(245, 166, 35, 0.08);
    box-shadow: 0 8px 24px rgba(245, 166, 35, 0.16);
}

.erw-cart:hover .erw-cart__badge {
    transform: translateY(-2px) scale(1.08);
}

.erw-nav__quote:hover svg {
    transform: translateX(4px);
}

.erw-mobile__link {
    transform-origin: left center;
}

/* ============================================================
   HOMEPAGE / SHARED MOTION TARGETS
============================================================ */
.erw-stats__bar,
.erw-footer__inner,
.erw-page-entry {
    transform-origin: 50% 70%;
}

.erw-manifest {
    will-change: transform;
}

/* ============================================================
   FOOTER POLISH
============================================================ */
.erw-footer__col-title {
    position: relative;
    display: inline-flex;
    padding-bottom: 8px;
}

.erw-footer__col-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 24px;
    height: 2px;
    background: var(--erw-gold);
    transform-origin: left;
    transition: width var(--erw-motion-smooth);
}

.erw-footer__col:hover .erw-footer__col-title::after,
.erw-footer__news:hover .erw-footer__col-title::after {
    width: 42px;
}

.erw-social a {
    position: relative;
    overflow: hidden;
}

.erw-social a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0);
    transition: box-shadow var(--erw-motion-quick);
}

.erw-social a:hover::after {
    box-shadow: inset 0 0 0 1px rgba(13, 27, 46, 0.16);
}

.erw-news__form {
    transition: border-color var(--erw-motion-quick),
                box-shadow var(--erw-motion-quick),
                transform var(--erw-motion-quick);
}

.erw-news__form:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(7, 14, 26, 0.2);
}

.erw-contact__row svg {
    transition: transform var(--erw-motion-smooth);
}

.erw-contact__row:hover svg {
    transform: translateY(-1px) scale(1.08);
}

.erw-botbar__pay span {
    transition: color var(--erw-motion-quick),
                border-color var(--erw-motion-quick),
                transform var(--erw-motion-quick);
}

.erw-botbar__pay span:hover {
    color: var(--erw-gold);
    border-color: rgba(245, 166, 35, 0.35);
    transform: translateY(-1px);
}

/* ============================================================
   STANDARD WORDPRESS CONTENT PAGES
   Avoids reusing the header's .erw-main class.
============================================================ */
.erw-page-main {
    width: min(100% - 40px, 1100px);
    margin: 0 auto;
    padding: clamp(56px, 8vw, 112px) 0 clamp(56px, 7vw, 88px);
}

.erw-page-entry {
    background: var(--erw-white);
    border: 1px solid var(--erw-border);
    border-radius: var(--erw-r-lg);
    box-shadow: var(--erw-shadow-md);
    padding: clamp(28px, 5vw, 60px);
}

.erw-page-title {
    color: var(--erw-navy-dark);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 28px;
}

.erw-entry-content {
    color: var(--erw-text);
    font-size: 15px;
    line-height: 1.8;
}

.erw-entry-content > * + * {
    margin-top: 1.25em;
}

.erw-entry-content h2,
.erw-entry-content h3,
.erw-entry-content h4 {
    color: var(--erw-navy-dark);
    line-height: 1.25;
    margin-top: 1.8em;
}

.erw-entry-content a {
    color: var(--erw-gold-dark);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.erw-entry-content img {
    border-radius: var(--erw-r-md);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    [data-erw-reveal],
    [data-erw-stagger] > *,
    [data-erw-parallax],
    [data-erw-intro-item],
    [data-erw-hero-item],
    [data-erw-hero-heading] > span,
    [data-erw-hero-buttons] > *,
    [data-erw-hero-mini] > *,
    [data-erw-hero-stage],
    [data-erw-mobile-item] {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

}
