/* FrostTail — site-unika stilar som inte är Tailwind-utilities.
   Laddas efter Tailwind CDN men före gadjade inline-script. */

/* Undvik horisontellt hopp när scrollbar visas/försvinner mellan sidor */
html {
    scrollbar-gutter: stable;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.glass-card {
    background: rgba(31, 31, 35, 0.55);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.neon-border-glow {
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.12), 0 0 36px rgba(99, 102, 241, 0.08), inset 0 0 0 1px rgba(165, 180, 252, 0.18);
}

.neon-border-glow:hover {
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.22), 0 0 48px rgba(129, 140, 248, 0.15), inset 0 0 0 1px rgba(196, 181, 253, 0.35);
}

.card-popular-violet {
    box-shadow: 0 0 40px rgba(147, 125, 255, 0.22), inset 0 0 0 1px rgba(196, 181, 253, 0.25);
}

/* Webbhost gröna kort: hover som ren CSS eftersom Tailwind CDN inte genererar hover: för egna klasser */
.green-host-card {
    border: 1px solid rgba(16, 185, 129, 0.22);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.1), 0 0 28px rgba(20, 184, 166, 0.06), inset 0 0 0 1px rgba(52, 211, 153, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.green-host-card:hover {
    border-color: rgba(16, 185, 129, 0.48);
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.2), 0 0 40px rgba(45, 212, 191, 0.12), inset 0 0 0 1px rgba(110, 231, 183, 0.18);
}

.green-host-card--popular {
    border-width: 2px;
    border-color: rgba(16, 185, 129, 0.55);
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.16), 0 0 52px rgba(20, 184, 166, 0.09), inset 0 0 0 1px rgba(52, 211, 153, 0.16);
}

.green-host-card--popular:hover {
    border-color: rgba(52, 211, 153, 0.72);
    box-shadow: 0 0 32px rgba(16, 185, 129, 0.24), 0 0 56px rgba(45, 212, 191, 0.16), inset 0 0 0 1px rgba(110, 231, 183, 0.24);
}

.green-glow-border-card {
    position: relative;
}

.green-glow-border-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.42), rgba(45, 212, 191, 0.38), rgba(16, 185, 129, 0.28));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.green-glow-border-card:hover::after {
    opacity: 0.72;
}

.text-gradient-ethereal {
    background: linear-gradient(135deg, #7dd3fc 0%, #a78bfa 45%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-green {
    background: linear-gradient(to right, #34d399, #2dd4bf);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-border-card {
    position: relative;
}

.glow-border-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(129, 140, 248, 0.45), rgba(236, 72, 153, 0.25));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.glow-border-card:hover::after {
    opacity: 0.9;
}

/* Mjukare sidväxling (t.ex. jämför hosting) i stödjande webbläsare */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.22s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scroll-in (IntersectionObserver lägger till .is-visible) */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(1rem);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* "Vad du får" – Kontakta oss: subtil glans som sveper (startsida) */
@keyframes homeVadDuFarCtaShine {
    0%,
    72% {
        transform: translateX(-145%) skewX(-16deg);
        opacity: 0;
    }
    74% {
        opacity: 1;
    }
    84% {
        transform: translateX(230%) skewX(-16deg);
        opacity: 0.9;
    }
    86%,
    100% {
        transform: translateX(230%) skewX(-16deg);
        opacity: 0;
    }
}

@keyframes homeVadDuFarCtaShineHover {
    0% {
        transform: translateX(-145%) skewX(-16deg);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    100% {
        transform: translateX(230%) skewX(-16deg);
        opacity: 0;
    }
}

.home-vad-du-far-cta {
    position: relative;
    isolation: isolate;
}

.home-vad-du-far-cta__shine {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.home-vad-du-far-cta__shine-bar {
    position: absolute;
    top: -55%;
    bottom: -55%;
    left: 0;
    width: 48%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 38%,
        rgba(255, 255, 255, 0.28) 50%,
        rgba(255, 255, 255, 0) 62%,
        transparent 100%
    );
    transform: translateX(-145%) skewX(-16deg);
    opacity: 0;
    animation: homeVadDuFarCtaShine 5.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.home-vad-du-far-cta:hover .home-vad-du-far-cta__shine-bar,
.home-vad-du-far-cta:focus-visible .home-vad-du-far-cta__shine-bar {
    animation: homeVadDuFarCtaShineHover 0.72s cubic-bezier(0.22, 1, 0.36, 1) 1;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .home-vad-du-far-cta__shine-bar {
        animation: none !important;
        opacity: 0 !important;
    }
}
