Fejlécek
Lebegő fókusz
Élő előnézet – a komponens teljes méretben.
Élő előnézet
HTML · CSS · JS
<section class="hero-floating">
<div class="floating-noise"></div>
<div class="floating-orbit orbit-one"></div>
<div class="floating-orbit orbit-two"></div>
<div class="floating-orbit orbit-three"></div>
<div class="floating-core">
<div class="core-glow"></div>
<div class="core-inner">
<span class="core-symbol">✦</span>
</div>
</div>
<div class="floating-line line-one"></div>
<div class="floating-line line-two"></div>
<div class="floating-line line-three"></div>
<div class="floating-point point-one">
<span></span>
<div>
<small>01</small>
<strong>Ötlet</strong>
<p>Innen indul minden.</p>
</div>
</div>
<div class="floating-point point-two">
<span></span>
<div>
<small>02</small>
<strong>Forma</strong>
<p>Az ötlet életre kel.</p>
</div>
</div>
<div class="floating-point point-three">
<span></span>
<div>
<small>03</small>
<strong>Élmény</strong>
<p>Ami végül megmarad.</p>
</div>
</div>
<div class="floating-content">
<div class="floating-kicker">
<span></span>
<em class="typing-text"></em>
<span class="typing-cursor"></span>
</div>
<h1 class="floating-title">
<span>Gondolatból</span>
<strong>élmény.</strong>
</h1>
<p class="floating-description">
Digitális világok, amelyek nemcsak működnek,
hanem érzést is keltenek.
</p>
<a href="#" class="floating-button">
Felfedezem
<span>↗</span>
</a>
</div>
<div class="floating-corner floating-corner-left">
<span>CREATIVE STUDIO</span>
</div>
<div class="floating-corner floating-corner-right">
<span>EST. 2026</span>
</div>
</section>
.hero-floating {
position: relative;
width: 100%;
min-height: 760px;
overflow: hidden;
isolation: isolate;
background:
radial-gradient(circle at 50% 48%, rgba(197, 171, 127, .13), transparent 18%),
radial-gradient(circle at 20% 80%, rgba(89, 112, 105, .12), transparent 25%),
#0b0d0d;
color: #f4f1e9;
display: flex;
align-items: center;
justify-content: center;
font-family: Arial, sans-serif;
}
/* --------------------------------
FINOM TEXTÚRA
-------------------------------- */
.floating-noise {
position: absolute;
inset: 0;
pointer-events: none;
opacity: .055;
background-image:
url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
/* --------------------------------
KÖZÉPSŐ MAG
-------------------------------- */
.floating-core {
position: absolute;
width: 250px;
height: 250px;
border-radius: 50%;
transform-style: preserve-3d;
background:
radial-gradient(
circle at 35% 30%,
rgba(255,255,255,.22),
rgba(255,255,255,.04) 35%,
rgba(190,160,110,.08) 60%,
transparent 72%
);
border: 1px solid rgba(255,255,255,.13);
box-shadow:
0 0 80px rgba(207,180,130,.12),
inset 0 0 50px rgba(255,255,255,.04);
backdrop-filter: blur(8px);
z-index: 2;
animation:
floatingCoreAppear 1.5s ease forwards,
floatingCore 7s ease-in-out 1.5s infinite;
}
.core-glow {
position: absolute;
inset: -50px;
border-radius: 50%;
background:
radial-gradient(
circle,
rgba(205,177,125,.16),
transparent 65%
);
filter: blur(20px);
z-index: -1;
animation: corePulse 4s ease-in-out infinite;
}
.core-inner {
position: absolute;
inset: 38px;
border-radius: 50%;
border: 1px solid rgba(255,255,255,.15);
display: flex;
align-items: center;
justify-content: center;
background:
radial-gradient(
circle,
rgba(255,255,255,.08),
rgba(255,255,255,.015)
);
box-shadow:
inset 0 0 30px rgba(255,255,255,.04);
}
.core-symbol {
font-size: 38px;
font-weight: 300;
color: #d8bf91;
text-shadow:
0 0 25px rgba(216,191,145,.8);
animation: symbolPulse 3s ease-in-out infinite;
}
/* --------------------------------
ORBITOK
-------------------------------- */
.floating-orbit {
position: absolute;
left: 50%;
top: 50%;
border-radius: 50%;
border: 1px solid rgba(255,255,255,.07);
transform: translate(-50%, -50%);
pointer-events: none;
}
.orbit-one {
width: 390px;
height: 390px;
transform:
translate(-50%, -50%)
rotate(20deg)
scaleY(.43);
animation: orbitRotate 18s linear infinite;
}
.orbit-two {
width: 500px;
height: 500px;
transform:
translate(-50%, -50%)
rotate(-35deg)
scaleY(.38);
border-color: rgba(204,179,137,.09);
animation: orbitRotateReverse 24s linear infinite;
}
.orbit-three {
width: 640px;
height: 640px;
transform:
translate(-50%, -50%)
rotate(60deg)
scaleY(.25);
border-color: rgba(255,255,255,.045);
animation: orbitRotate 30s linear infinite;
}
/* --------------------------------
VONALAK
-------------------------------- */
.floating-line {
position: absolute;
height: 1px;
background:
linear-gradient(
90deg,
transparent,
rgba(207,180,135,.55),
transparent
);
transform-origin: left center;
opacity: 0;
animation: lineAppear 1.2s ease forwards;
}
.line-one {
width: 220px;
left: calc(50% + 80px);
top: calc(50% - 90px);
transform: rotate(-28deg);
animation-delay: .8s;
}
.line-two {
width: 180px;
left: calc(50% - 250px);
top: calc(50% + 80px);
transform: rotate(20deg);
animation-delay: 1s;
}
.line-three {
width: 150px;
left: calc(50% + 50px);
top: calc(50% + 110px);
transform: rotate(28deg);
animation-delay: 1.2s;
}
/* --------------------------------
INFORMÁCIÓS PONTOK
-------------------------------- */
.floating-point {
position: absolute;
display: flex;
align-items: center;
gap: 14px;
z-index: 5;
opacity: 0;
animation:
pointAppear .9s ease forwards,
pointFloat 5s ease-in-out 1s infinite;
}
.floating-point > span {
width: 8px;
height: 8px;
border-radius: 50%;
background: #d4b982;
box-shadow:
0 0 0 5px rgba(212,185,130,.08),
0 0 18px rgba(212,185,130,.8);
flex-shrink: 0;
}
.floating-point div {
display: flex;
flex-direction: column;
gap: 2px;
}
.floating-point small {
font-size: 9px;
letter-spacing: 3px;
color: #a79d8d;
}
.floating-point strong {
font-family: Georgia, serif;
font-size: 18px;
font-weight: 400;
}
.floating-point p {
margin: 0;
font-size: 11px;
color: #888b87;
}
.point-one {
left: 9%;
top: 27%;
animation-delay: .9s;
}
.point-two {
right: 8%;
top: 33%;
animation-delay: 1.1s;
}
.point-three {
right: 12%;
bottom: 21%;
animation-delay: 1.3s;
}
/* --------------------------------
KÖZPONTI SZÖVEG
-------------------------------- */
.floating-content {
position: relative;
z-index: 10;
width: min(650px, 80%);
text-align: center;
margin-top: 10px;
pointer-events: none;
}
.floating-kicker {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
min-height: 18px;
margin-bottom: 22px;
font-size: 10px;
letter-spacing: 4px;
text-transform: uppercase;
color: #b8a98d;
}
.floating-kicker > span:first-child,
.floating-kicker > span:last-child {
width: 28px;
height: 1px;
background: rgba(201,178,139,.45);
}
.typing-text {
min-width: 150px;
}
.typing-cursor {
width: 1px;
height: 13px;
background: #d8bf91;
animation: cursorBlink .7s infinite;
}
/* --------------------------------
FŐCÍM
-------------------------------- */
.floating-title {
margin: 0;
display: flex;
flex-direction: column;
font-family: Georgia, "Times New Roman", serif;
font-size: clamp(55px, 7vw, 105px);
line-height: .92;
font-weight: 400;
letter-spacing: -4px;
}
.floating-title span,
.floating-title strong {
display: block;
opacity: 0;
transform: translateY(35px);
animation: titleLetterAppear .8s cubic-bezier(.16,1,.3,1) forwards;
}
.floating-title span {
animation-delay: .2s;
}
.floating-title strong {
color: #d4b982;
font-weight: 400;
animation-delay: .55s;
}
.floating-description {
max-width: 430px;
margin: 28px auto 0;
color: #a5a7a2;
font-size: 14px;
line-height: 1.8;
opacity: 0;
animation: fadeUp .8s ease .9s forwards;
}
/* --------------------------------
GOMB
-------------------------------- */
.floating-button {
display: inline-flex;
align-items: center;
gap: 20px;
margin-top: 34px;
padding: 15px 23px;
border: 1px solid rgba(212,185,130,.45);
border-radius: 100px;
color: #f3eee5;
text-decoration: none;
font-size: 11px;
letter-spacing: 2px;
text-transform: uppercase;
pointer-events: auto;
opacity: 0;
animation: fadeUp .8s ease 1.1s forwards;
transition:
background .35s ease,
border-color .35s ease,
transform .35s ease,
box-shadow .35s ease;
}
.floating-button span {
font-size: 18px;
line-height: 0;
transition: transform .35s ease;
}
.floating-button:hover {
background: rgba(212,185,130,.1);
border-color: rgba(212,185,130,.8);
transform: translateY(-3px);
box-shadow:
0 12px 35px rgba(0,0,0,.3);
}
.floating-button:hover span {
transform: translate(4px, -4px);
}
/* --------------------------------
SAROKINFORMÁCIÓ
-------------------------------- */
.floating-corner {
position: absolute;
bottom: 28px;
font-size: 9px;
letter-spacing: 3px;
color: #686b68;
z-index: 10;
}
.floating-corner-left {
left: 30px;
}
.floating-corner-right {
right: 30px;
}
/* --------------------------------
ANIMÁCIÓK
-------------------------------- */
@keyframes floatingCoreAppear {
from {
opacity: 0;
transform: scale(.7);
}
to {
opacity: 1;
transform: scale(1);
}
}
@keyframes floatingCore {
0%, 100% {
margin-top: 0;
}
50% {
margin-top: -13px;
}
}
@keyframes corePulse {
0%, 100% {
opacity: .45;
transform: scale(.95);
}
50% {
opacity: .8;
transform: scale(1.08);
}
}
@keyframes symbolPulse {
0%, 100% {
transform: scale(1);
opacity: .7;
}
50% {
transform: scale(1.15);
opacity: 1;
}
}
@keyframes orbitRotate {
from {
rotate: 0deg;
}
to {
rotate: 360deg;
}
}
@keyframes orbitRotateReverse {
from {
rotate: 0deg;
}
to {
rotate: -360deg;
}
}
@keyframes lineAppear {
from {
opacity: 0;
scale: 0 1;
}
to {
opacity: .7;
scale: 1 1;
}
}
@keyframes pointAppear {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pointFloat {
0%, 100% {
margin-top: 0;
}
50% {
margin-top: -7px;
}
}
@keyframes titleLetterAppear {
from {
opacity: 0;
transform: translateY(35px);
filter: blur(8px);
}
to {
opacity: 1;
transform: translateY(0);
filter: blur(0);
}
}
@keyframes fadeUp {
from {
opacity: 0;
transform: translateY(18px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes cursorBlink {
0%, 45% {
opacity: 1;
}
46%, 100% {
opacity: 0;
}
}
/* --------------------------------
TABLET
-------------------------------- */
@media (max-width: 900px) {
.hero-floating {
min-height: 700px;
}
.floating-core {
width: 210px;
height: 210px;
}
.orbit-three {
width: 520px;
height: 520px;
}
.point-one {
left: 5%;
}
.point-two {
right: 4%;
}
.point-three {
right: 6%;
}
}
/* --------------------------------
MOBIL
-------------------------------- */
@media (max-width: 650px) {
.hero-floating {
min-height: 680px;
}
.floating-core {
width: 170px;
height: 170px;
}
.core-inner {
inset: 28px;
}
.core-symbol {
font-size: 27px;
}
.orbit-one {
width: 280px;
height: 280px;
}
.orbit-two {
width: 370px;
height: 370px;
}
.orbit-three {
width: 450px;
height: 450px;
}
.floating-title {
font-size: clamp(46px, 14vw, 72px);
letter-spacing: -2px;
}
.floating-description {
font-size: 13px;
max-width: 310px;
}
.floating-point {
transform: scale(.8);
}
.point-one {
left: 2%;
top: 19%;
}
.point-two {
right: 0;
top: 72%;
}
.point-three {
display: none;
}
.line-one,
.line-two,
.line-three {
display: none;
}
.floating-corner {
bottom: 18px;
font-size: 7px;
letter-spacing: 2px;
}
.floating-corner-left {
left: 15px;
}
.floating-corner-right {
right: 15px;
}
}
@media (prefers-reduced-motion: reduce) {
.floating-core,
.floating-orbit,
.core-glow,
.core-symbol,
.floating-point,
.floating-title span,
.floating-title strong,
.floating-description,
.floating-button,
.floating-line {
animation: none !important;
opacity: 1 !important;
transform: none !important;
}
}
document.addEventListener("DOMContentLoaded", () => {
const hero = document.querySelector(".hero-floating");
if (!hero) return;
/* --------------------------------
GÉPELŐS SZÖVEG
-------------------------------- */
const typingElement =
hero.querySelector(".typing-text");
const phrases = [
"Ideas in motion",
"Digital experiences",
"Creative thinking",
"Made to inspire"
];
let phraseIndex = 0;
let characterIndex = 0;
let deleting = false;
function typeText() {
if (!typingElement) return;
const current =
phrases[phraseIndex];
if (!deleting) {
characterIndex++;
typingElement.textContent =
current.substring(0, characterIndex);
if (characterIndex === current.length) {
deleting = true;
setTimeout(typeText, 1800);
return;
}
setTimeout(typeText, 75);
} else {
characterIndex--;
typingElement.textContent =
current.substring(0, characterIndex);
if (characterIndex === 0) {
deleting = false;
phraseIndex =
(phraseIndex + 1) % phrases.length;
setTimeout(typeText, 400);
return;
}
setTimeout(typeText, 40);
}
}
setTimeout(typeText, 700);
/* --------------------------------
EGÉR PARALLAX
-------------------------------- */
if (
window.matchMedia("(pointer: fine)").matches &&
!window.matchMedia("(prefers-reduced-motion: reduce)").matches
) {
const core =
hero.querySelector(".floating-core");
const orbits =
hero.querySelectorAll(".floating-orbit");
const points =
hero.querySelectorAll(".floating-point");
hero.addEventListener("mousemove", (event) => {
const rect =
hero.getBoundingClientRect();
const x =
(event.clientX - rect.left) /
rect.width - 0.5;
const y =
(event.clientY - rect.top) /
rect.height - 0.5;
if (core) {
core.style.transform =
`translate(${x * 14}px, ${y * 14}px)`;
}
orbits.forEach((orbit, index) => {
const strength =
(index + 1) * 5;
orbit.style.marginLeft =
`${x * strength}px`;
orbit.style.marginTop =
`${y * strength}px`;
});
points.forEach((point, index) => {
const strength =
(index + 1) * 3;
point.style.translate =
`${x * strength}px ${y * strength}px`;
});
});
hero.addEventListener("mouseleave", () => {
if (core) {
core.style.transform = "";
}
orbits.forEach((orbit) => {
orbit.style.marginLeft = "";
orbit.style.marginTop = "";
});
points.forEach((point) => {
point.style.translate = "";
});
});
}
});