/* =========================================================
   Speedx Services — premium.css
   Cinematic "Modern Dark" upgrade layer.
   Loaded LAST so it enhances main.css without a rewrite.
   Design language: ambient light, layered glass, Expo.out
   easing, rotating gradient borders, scale-press feedback.
   ========================================================= */

:root {
    /* Cinematic easing + motion tokens */
    --sx-ease:      cubic-bezier(0.16, 1, 0.3, 1);   /* Expo.out */
    --sx-ease-in:   cubic-bezier(0.4, 0, 1, 1);
    --sx-dur:       .7s;

    /* Deeper, more layered surfaces */
    --sx-glass:     rgba(18, 28, 58, 0.45);
    --sx-glass-2:   rgba(12, 20, 46, 0.72);
    --sx-line:      rgba(130, 165, 240, 0.14);
    --sx-hair:      rgba(255, 255, 255, 0.06);
    --sx-shadow:    0 30px 80px -20px rgba(2, 6, 20, 0.75);
    --sx-shadow-glow: 0 0 0 1px rgba(47,139,255,0.15), 0 20px 60px -18px rgba(47,139,255,0.35);
}

@property --sx-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ---------- Cinematic background atmosphere ---------- */
.sx-atmos {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}
.sx-atmos__blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.45;
    will-change: transform;
    /* Pre-blurred via soft radial stop instead of filter:blur (far cheaper) */
}
.sx-atmos__blob--1 { width: 52vw; height: 52vw; left: -12vw; top: -14vw;  background: radial-gradient(circle, rgba(47,107,255,0.55), transparent 62%); animation: sx-drift-1 26s var(--sx-ease) infinite alternate; }
.sx-atmos__blob--2 { width: 46vw; height: 46vw; right: -10vw; top: 20vh;   background: radial-gradient(circle, rgba(139,92,246,0.5), transparent 62%);  animation: sx-drift-2 32s var(--sx-ease) infinite alternate; }
.sx-atmos__blob--3 { width: 40vw; height: 40vw; left: 24vw;  bottom: -16vw; background: radial-gradient(circle, rgba(34,211,238,0.4), transparent 62%);  animation: sx-drift-3 30s var(--sx-ease) infinite alternate; opacity: 0.3; }

@keyframes sx-drift-1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6vw, 8vh, 0) scale(1.15); } }
@keyframes sx-drift-2 { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(-7vw, -6vh, 0) scale(0.9); } }
@keyframes sx-drift-3 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-5vw, -9vh, 0) scale(1.2); } }

/* Fine film grain for cinematic texture */
.sx-grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.045;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Refined typography ---------- */
body.sx-body { letter-spacing: -0.011em; }
.sx-section__title { letter-spacing: -0.03em; }
.sx-hero__title { letter-spacing: -0.04em; line-height: 1.05; }
.sx-stat__num, .sx-pricing-card__num { font-variant-numeric: tabular-nums; }

/* Gradient accent under section titles */
.sx-section__head .sx-section__title { position: relative; display: inline-block; }
.sx-section__head .sx-section__title::after {
    content: "";
    position: absolute;
    left: 50%; bottom: -14px;
    width: 54px; height: 3px;
    transform: translateX(-50%);
    border-radius: 3px;
    background: var(--sx-gradient);
    box-shadow: 0 0 16px rgba(47,139,255,0.6);
}

/* Eyebrow: animated pulse dot */
.sx-eyebrow { position: relative; padding-left: 26px; }
.sx-eyebrow::before {
    content: "";
    position: absolute; left: 12px; top: 50%;
    width: 6px; height: 6px; margin-top: -3px;
    border-radius: 50%;
    background: var(--sx-cyan);
    box-shadow: 0 0 0 0 rgba(34,211,238,0.5);
    animation: sx-pulse 2.4s var(--sx-ease) infinite;
}
@keyframes sx-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34,211,238,0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(34,211,238,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
}

/* ---------- Reveals with Expo easing + blur-in ---------- */
.sx-reveal {
    transition: opacity var(--sx-dur) var(--sx-ease),
                transform var(--sx-dur) var(--sx-ease),
                filter var(--sx-dur) var(--sx-ease);
    transform: translateY(34px);
    filter: blur(6px);
}
.sx-reveal.is-visible { transform: none; filter: blur(0); }

/* ---------- Buttons: sheen sweep + scale press ---------- */
.sx-btn { position: relative; overflow: hidden; transition: transform .3s var(--sx-ease), box-shadow .3s var(--sx-ease), background .3s var(--sx-ease); }
.sx-btn::after {
    content: "";
    position: absolute; top: 0; left: -80%;
    width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent);
    transform: skewX(-18deg);
    transition: left .6s var(--sx-ease);
    pointer-events: none;
}
.sx-btn:hover::after { left: 130%; }
.sx-btn:active { transform: scale(0.97); }
.sx-btn--primary {
    background: linear-gradient(120deg, #2f8bff, #8b5cf6 50%, #22d3ee);
    background-size: 180% 180%;
    animation: sx-gradient-move 8s ease infinite;
}
@keyframes sx-gradient-move { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- Glass surfaces: layered depth + top highlight ----------
   Cheap gradient sheen on ALL cards (no blur = no GPU cost),
   real backdrop-blur reserved for a few large hero surfaces only. */
.sx-service-card, .sx-game-card, .sx-benefit, .sx-feature, .sx-industry,
.sx-pricing-card, .sx-faq-item, .sx-step, .sx-contact__checklist,
.sx-security__item, .sx-hero__stats, .sx-endpoint {
    background:
        linear-gradient(180deg, var(--sx-hair), transparent 40%),
        var(--sx-glass);
    border-color: var(--sx-line);
}
.sx-hero__stats, .sx-pricing-card, .sx-contact__card {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}

/* ---------- Card hover: cheap lift + gradient glow (paint-light) ---------- */
.sx-service-card, .sx-game-card, .sx-benefit, .sx-pricing-card, .sx-feature, .sx-industry {
    position: relative;
    transition: transform .4s var(--sx-ease), box-shadow .4s var(--sx-ease), border-color .4s var(--sx-ease);
}
.sx-service-card:hover, .sx-game-card:hover, .sx-benefit:hover, .sx-pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sx-shadow), var(--sx-shadow-glow);
    border-color: rgba(47,139,255,0.5);
}
.sx-feature:hover, .sx-industry:hover { transform: translateY(-4px); border-color: rgba(47,139,255,0.45); }

/* Signature rotating-aurora border — ONLY on the featured pricing card (1 element) */
@keyframes sx-rotate { to { --sx-angle: 360deg; } }
.sx-pricing-card.is-featured::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--sx-angle), transparent 0deg, var(--sx-neon) 90deg, var(--sx-cyan) 170deg, var(--sx-purple) 250deg, transparent 330deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: sx-rotate 6s linear infinite;
    pointer-events: none;
}

/* ---------- Navbar: refined scrolled glass ---------- */
.sx-navbar.is-scrolled {
    background: linear-gradient(180deg, rgba(9,15,36,0.82), rgba(9,15,36,0.62));
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--sx-hair);
    box-shadow: 0 10px 40px -12px rgba(0,0,0,0.6);
}
.sx-navbar.is-scrolled::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(47,139,255,0.5), rgba(139,92,246,0.5), transparent);
}
.sx-nav-link { transition: color .25s var(--sx-ease), background .25s var(--sx-ease); }

/* ---------- Hero: cinematic depth ---------- */
.sx-hero__title .sx-gradient-text {
    background-size: 200% 200%;
    animation: sx-gradient-move 10s ease infinite;
    filter: drop-shadow(0 4px 30px rgba(47,139,255,0.35));
}
.sx-hero__image { filter: drop-shadow(0 40px 70px rgba(47,139,255,0.32)); border-radius: 22px; }
.sx-hero__badge, .sx-badge { backdrop-filter: blur(10px); }

/* Showcase images: cinematic frame + hover zoom */
.sx-showcase { transition: transform .5s var(--sx-ease), box-shadow .5s var(--sx-ease); }
.sx-showcase img { transition: transform .8s var(--sx-ease); }
.sx-showcase:hover { box-shadow: var(--sx-shadow), var(--sx-shadow-glow); }
.sx-showcase:hover img { transform: scale(1.03); }

/* Split-section media: subtle parallax lift on hover */
.sx-about__media img, .sx-integrations__media img,
.sx-security__media img, .sx-london__media img {
    transition: transform .5s var(--sx-ease), box-shadow .5s var(--sx-ease);
}
.sx-about__media img:hover, .sx-integrations__media img:hover,
.sx-security__media img:hover, .sx-london__media img:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--sx-shadow), var(--sx-shadow-glow);
}

/* ---------- Chips / pills: crisp glass ---------- */
.sx-chip, .sx-pill { transition: transform .25s var(--sx-ease), border-color .25s var(--sx-ease), background .25s var(--sx-ease); }
.sx-chip:hover, .sx-pill:hover { transform: translateY(-2px); border-color: rgba(47,139,255,0.45); }

/* ---------- Final CTA: aurora spotlight ---------- */
.sx-final-cta { position: relative; }
.sx-final-cta::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(60% 120% at 50% 0%, rgba(47,139,255,0.22), transparent 70%);
    pointer-events: none;
}

/* ---------- Back-to-top + sticky CTA polish ---------- */
.sx-back-to-top { transition: transform .35s var(--sx-ease), opacity .35s var(--sx-ease), box-shadow .35s var(--sx-ease); }
.sx-back-to-top:hover { transform: translateY(-3px); }

/* ---------- Scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: #2a3b66 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: linear-gradient(#2f8bff, #8b5cf6); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* Text selection */
::selection { background: rgba(47,139,255,0.35); color: #fff; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .sx-atmos__blob { animation: none !important; }
    .sx-btn--primary, .sx-hero__title .sx-gradient-text { animation: none !important; }
    .sx-eyebrow::before { animation: none !important; }
    .sx-service-card::after, .sx-game-card::after,
    .sx-benefit::after, .sx-pricing-card::after { animation: none !important; }
    .sx-reveal { filter: none !important; }
}
