/* Home page - hero banner and section effects (2026-10-03).
   Hero layers, bottom to top: ::after = the theme picture (inherited from .hero-section, so it shows without JS) with a slow
   drift > ::before = shade for readable text + fade into the page > home-fx.js layers (canvas, sky flash, sheen) > text.
   On wide screens the banner is always full width and takes the picture's own shape (--hfx-ratio = width / height, set by
   the view) up to 78 % of the window height, so the whole artwork shows instead of a thin cropped strip; the text then
   sits on the left. Phones keep the centred layout.
   .hfx-art is only set when the picture file exists, so without one the banner keeps its old text-sized layout.
   Decoration only: pointer-events none, aria-hidden; prefers-reduced-motion keeps everything still. */

/* ---- hero: picture layer, shade ------------------------------------------------------------------------------- */
.hero-section.hfx-hero { isolation: isolate; background-position: center; }
.hero-section.hfx-art::after {
    content: ''; position: absolute; inset: -2%; z-index: 0; pointer-events: none;
    background: inherit;
    background-size: cover; background-position: center;
    animation: hfxIntro 2.2s cubic-bezier(.2, .8, .2, 1) both, hfxDrift 32s ease-in-out 2.2s infinite alternate;
    will-change: transform;
}
@keyframes hfxIntro { from { transform: scale(1.08); } to { transform: none; } }   /* zoom only: the layer stays opaque, no double image */
@keyframes hfxDrift { from { transform: none; } to { transform: scale(1.05) translate3d(-1%, -0.6%, 0); } }
.hero-section.hfx-hero::before {
    top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
    background:
        radial-gradient(ellipse 58% 62% at 50% 46%, rgba(4, 7, 16, 0.55), rgba(4, 7, 16, 0.18) 60%, transparent 80%),
        linear-gradient(to top, var(--bg-primary, #0a0e1a) 0%, rgba(10, 14, 26, 0.55) 9%, transparent 26%);
}
.hfx-hero > .container { position: relative; z-index: 3; }
/* mouse parallax: home-fx.js sets --hfx-px / --hfx-py on the banner */
.hero-section.hfx-art::after { translate: var(--hfx-px, 0px) var(--hfx-py, 0px); transition: translate 0.8s ease-out; }
.hfx-ready .hfx-copy { translate: calc(var(--hfx-px, 0px) * -0.35) calc(var(--hfx-py, 0px) * -0.35); transition: translate 0.8s ease-out; }
.hfx-layer { position: absolute; pointer-events: none; }
.hfx-canvas { inset: 0; width: 100%; height: 100%; z-index: 2; }
.hfx-sky {
    inset: 0; z-index: 2; opacity: 0;
    background: radial-gradient(ellipse 34% 55% at var(--hfx-x, 20%) 0%, rgba(150, 190, 255, 0.5), rgba(80, 120, 255, 0.14) 50%, transparent 80%);
    mix-blend-mode: screen;
}
.hfx-sky.go { animation: hfxSky 0.9s ease-out 1 both; }
@keyframes hfxSky { 0% { opacity: 0; } 8% { opacity: 1; } 18% { opacity: 0.3; } 30% { opacity: 0.85; } 100% { opacity: 0; } }
.hfx-sheen {
    top: 0; bottom: 0; left: 0; width: 30%; z-index: 2;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.05) 42%, rgba(255, 244, 214, 0.12) 50%, rgba(255, 255, 255, 0.05) 58%, transparent 100%);
    transform: translateX(-130%);
    animation: hfxSheen 11s ease-in-out 3s infinite;
    will-change: transform;
}
@keyframes hfxSheen { 0% { transform: translateX(-130%); } 30%, 100% { transform: translateX(400%); } }

/* ---- hero: text ------------------------------------------------------------------------------------------------- */
.hero-section .hfx-title {
    position: relative;
    background: linear-gradient(100deg, #e9a21f 0%, #ffd56a 18%, #f59e0b 34%, #ffe9a8 46%, #fffbea 50%, #ffe9a8 54%, #f59e0b 66%, #ffd56a 82%, #e9a21f 100%);
    background-size: 250% 100%; background-position: 0 0;
    -webkit-background-clip: text; background-clip: text;
    color: transparent !important; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 18px rgba(245, 158, 11, 0.45));
    letter-spacing: 2px;
    margin-bottom: 0.6rem !important;
}
.hfx-ready .hero-section .hfx-title { animation: hfxTitleIn 1.3s cubic-bezier(.2, .9, .25, 1) 0.3s both, hfxShine 6s linear 2s infinite; }
@keyframes hfxTitleIn { from { opacity: 0; letter-spacing: 0.5em; transform: translateY(10px); } to { opacity: 1; } }
@keyframes hfxShine { 0% { background-position: 100% 0; } 25%, 100% { background-position: 0% 0; } }
.hfx-rule {
    width: min(340px, 78%); height: 2px; margin: 0 auto 1rem;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 120, 0.95), rgba(130, 175, 255, 0.75), transparent);
    box-shadow: 0 0 12px rgba(255, 210, 120, 0.55);
    transform-origin: center;
}
.hfx-ready .hfx-rule { animation: hfxRule 1.2s ease-out 0.8s both; }
@keyframes hfxRule { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-section.hfx-hero .hfx-sub {
    color: #e6ebf5 !important;
    text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500;
    font-size: clamp(0.72rem, 0.92vw, 1.02rem);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9);
}
.hfx-ready .hfx-sub { animation: hfxUp 0.9s ease-out 0.75s both; }
.hfx-ready .hfx-stats { animation: hfxUp 0.9s ease-out 0.95s both; }
.hfx-ready .hfx-cta { animation: hfxUp 0.9s ease-out 1.15s both; }
@keyframes hfxUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hfx-hero .online-box {
    background: rgba(5, 18, 14, 0.58);
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.18), inset 0 0 18px rgba(16, 185, 129, 0.08);
}
.hfx-hero .online-box small { color: #cbd5e1 !important; }
.hfx-cta { flex-wrap: wrap; }
.hfx-cta .btn-warning { position: relative; overflow: hidden; box-shadow: 0 6px 24px rgba(245, 158, 11, 0.35); }
.hfx-cta .btn-warning::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -45%; width: 32%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: hfxSweep 3.6s ease-in-out 2s infinite;
}
@keyframes hfxSweep { 0%, 55% { transform: translateX(0); } 100% { transform: translateX(480%); } }
.hfx-cta .btn-outline-light { background: rgba(8, 12, 24, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* wide screens with a picture: full width, the picture's shape (capped at 78 % of the window height), text on the left
   over the dark part of the art. A plain height, not aspect-ratio + max-height: that pair turns the height cap into a
   width cap and left an empty strip on screens wider than 2160 px. */
@media (min-width: 992px) {
    .hero-section.hfx-art {
        height: clamp(440px, calc(100vw / var(--hfx-ratio, 3)), 78vh);
        padding: 0 !important;
        display: flex; align-items: center;
        background-position: center 25%;
    }
    .hero-section.hfx-art::after { background-position: center 25%; }
    .hero-section.hfx-art.text-center { text-align: left !important; }
    .hero-section.hfx-art::before {
        background:
            linear-gradient(90deg, rgba(4, 7, 16, 0.86) 0%, rgba(4, 7, 16, 0.6) 20%, rgba(4, 7, 16, 0.2) 36%, transparent 50%),
            linear-gradient(to top, var(--bg-primary, #0a0e1a) 0%, rgba(10, 14, 26, 0.55) 8%, transparent 24%);
    }
    .hfx-art > .container { max-width: none; width: 100%; padding-left: clamp(28px, 5.2vw, 120px); padding-right: 24px; }
    .hfx-art .hfx-copy { max-width: min(620px, 34vw); }
    .hfx-art .hfx-title { font-size: clamp(3.2rem, 5.4vw, 6.2rem); }
    .hfx-art .hfx-rule { margin-left: 0; }
    .hfx-art .hfx-stats, .hfx-art .hfx-cta { justify-content: flex-start !important; }
    .hfx-art .hfx-stats { margin-left: 0; margin-right: 0; }
    .hfx-art .hfx-stats > .col-auto { padding-left: 0; }
}
/* big screens: the text block grows with the banner */
@media (min-width: 2200px) { .hfx-art .hfx-copy { zoom: 1.3; } }
@media (min-width: 3000px) { .hfx-art .hfx-copy { zoom: 1.6; } }
@media (max-width: 768px) {
    .hero-section .hfx-title { font-size: 2.2rem; }
}

/* ---- sections below the hero: reveal on scroll, heading light, card touches -------------------------------------- */
.hero-section.hfx-hero + section { margin-top: 2.5rem; }
.hfx-reveal { opacity: 0; translate: 0 26px; transition: opacity 0.7s ease, translate 0.7s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--hfx-i, 0) * 90ms); }
.hfx-reveal.hfx-in { opacity: 1; translate: 0 0; }
.hfx-sec > h4::after {
    content: ''; display: block; width: 0; height: 2px; margin: 0.55rem 0 0;
    background: linear-gradient(90deg, rgba(255, 215, 120, 0.95), rgba(255, 215, 120, 0));
    box-shadow: 0 0 10px rgba(255, 210, 120, 0.45);
    transition: width 1.1s ease 0.25s;
}
.hfx-sec > h4.text-center::after { margin-left: auto; margin-right: auto; background: linear-gradient(90deg, transparent, rgba(255, 215, 120, 0.95), transparent); }
.hfx-sec > h4.hfx-in::after, .hfx-sec > h4:not(.hfx-reveal)::after { width: 140px; }

.hfx-glint {
    position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; z-index: 1; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    animation: hfxGlint 8s ease-in-out infinite;
}
.war-champion-arca .hfx-glint { animation-delay: 4s; }
@keyframes hfxGlint { 0%, 70% { transform: translateX(0); } 100% { transform: translateX(520%); } }
.hfx-edge {
    position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: 1; pointer-events: none;
    background: linear-gradient(130deg, rgba(255, 215, 120, 0.85), rgba(255, 215, 120, 0.08) 35%, rgba(255, 215, 120, 0.08) 65%, rgba(255, 215, 120, 0.85));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: hfxEdge 4s ease-in-out infinite;
}
.war-champion-arca .hfx-edge {
    background: linear-gradient(130deg, rgba(79, 195, 247, 0.8), rgba(79, 195, 247, 0.06) 35%, rgba(79, 195, 247, 0.06) 65%, rgba(79, 195, 247, 0.8));
    animation-delay: -2s;
}
@keyframes hfxEdge { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.hfx-ready .hfx-sec .card-glass .fa-medal, .hfx-ready .hfx-sec .card-glass .fa-skull { animation: hfxMedal 3.2s ease-in-out infinite; }
@keyframes hfxMedal { 0%, 80%, 100% { filter: none; } 90% { filter: brightness(1.8) drop-shadow(0 0 6px rgba(255, 255, 255, 0.8)); } }
.hfx-sec a .card-glass img { transition: transform 0.6s ease; }
.hfx-sec a:hover .card-glass img { transform: scale(1.06); }
.hfx-sec a:hover .card-glass { box-shadow: 0 0 26px rgba(245, 158, 11, 0.18); }
.hfx-ready .hfx-sec .card-glass > .fa-3x { animation: hfxFloat 4s ease-in-out infinite; }
@keyframes hfxFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

@media (prefers-reduced-motion: reduce) {
    .hero-section.hfx-art::after, .hfx-sheen, .hfx-ready .hero-section .hfx-title, .hfx-ready .hfx-rule, .hfx-ready .hfx-sub,
    .hfx-ready .hfx-stats, .hfx-ready .hfx-cta, .hfx-cta .btn-warning::after, .hfx-glint, .hfx-edge,
    .hfx-ready .hfx-sec .card-glass .fa-medal, .hfx-ready .hfx-sec .card-glass .fa-skull,
    .hfx-ready .hfx-sec .card-glass > .fa-3x { animation: none !important; }
    .hfx-canvas, .hfx-sky, .hfx-sheen, .hfx-glint, .hfx-cta .btn-warning::after { display: none !important; }
    .hfx-reveal { opacity: 1 !important; translate: none !important; transition: none !important; }
    .hfx-sec a .card-glass img { transition: none; }
}
