/*
 * Link hover animations, grey → white. The effect is picked in admin → Dizajn and set as
 * a .hv-<key> class on <body> (public page) or on a preview tile (admin).
 * Markup: <a class="hv"><span class="title">…</span></a>. --hv is the "white" colour.
 */
.hv { --hv: var(--text, #fff); position: relative; opacity: .5; transition: opacity .3s ease; }
.hv .title { transition: letter-spacing .35s ease, text-shadow .35s ease, background-position .45s ease; }

/* 1. Fade — plain cross-fade */
.hv-fade .hv:hover, .hv-fade .hv:focus-visible { opacity: 1; }

/* 2. Underline — a line grows out from the centre */
.hv-underline .hv .title { position: relative; }
.hv-underline .hv .title::after {
    content: ""; position: absolute; left: 0; right: var(--link-ls, 0em); bottom: -4px; height: 1px;
    background: var(--hv); transform: scaleX(0); transition: transform .35s ease;
}
.hv-underline .hv:hover, .hv-underline .hv:focus-visible { opacity: 1; }
.hv-underline .hv:hover .title::after, .hv-underline .hv:focus-visible .title::after { transform: scaleX(1); }

/* 3. Wipe — white sweeps across the letters from left to right */
.hv-wipe .hv { opacity: 1; }
.hv-wipe .hv .title {
    color: transparent; -webkit-background-clip: text; background-clip: text;
    background-image: linear-gradient(90deg, var(--hv) 50%, color-mix(in srgb, var(--hv) 50%, transparent) 50%);
    background-size: 200% 100%; background-position: 100% 0;
}
.hv-wipe .hv:hover .title, .hv-wipe .hv:focus-visible .title { background-position: 0 0; }

/* 4. Spread — letters move apart */
.hv-spread .hv:hover, .hv-spread .hv:focus-visible { opacity: 1; }
.hv-spread .hv:hover .title, .hv-spread .hv:focus-visible .title { letter-spacing: calc(var(--link-ls, 0em) + .1em); }

/* 5. Glow — soft light around the letters */
.hv-glow .hv:hover, .hv-glow .hv:focus-visible { opacity: 1; }
.hv-glow .hv:hover .title, .hv-glow .hv:focus-visible .title {
    text-shadow: 0 0 10px color-mix(in srgb, var(--hv) 70%, transparent), 0 0 24px color-mix(in srgb, var(--hv) 35%, transparent);
}

@media (prefers-reduced-motion: reduce) {
    .hv, .hv .title, .hv .title::after { transition: none; }
}
