/* ==========================================================================
   Przystań — Aurora (tło globalne) + Hero
   ========================================================================== */

/* --- Aurora: miękkie gradient-mesh pod całą stroną --- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(var(--accent-rgb), 0.55) 0%, transparent 60%),
        linear-gradient(180deg, var(--light-color) 0%, var(--white) 45%, var(--light-color) 100%);
    pointer-events: none;
}

.aurora__blob {
    position: absolute;
    border-radius: var(--radius-blob);
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
}

.aurora__blob--1 {
    top: -12%;
    left: -8%;
    width: 46vmax;
    height: 42vmax;
    background: radial-gradient(circle at 35% 35%, rgba(var(--primary-rgb), 0.8), transparent 68%);
    animation: aurora-drift-1 46s var(--ease-in-out-soft) infinite alternate;
}

.aurora__blob--2 {
    top: 28%;
    right: -14%;
    width: 52vmax;
    height: 46vmax;
    background: radial-gradient(circle at 60% 40%, rgba(var(--secondary-rgb), 0.62), transparent 68%);
    animation: aurora-drift-2 58s var(--ease-in-out-soft) infinite alternate;
}

.aurora__blob--3 {
    bottom: -18%;
    left: 22%;
    width: 48vmax;
    height: 40vmax;
    background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.9), transparent 70%);
    animation: aurora-drift-3 52s var(--ease-in-out-soft) infinite alternate;
}

/* Ziarno: delikatna tekstura, która łamie banding gradientów */
.aurora__grain {
    position: absolute;
    inset: -50%;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes aurora-drift-1 {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(6vw, 5vh, 0) scale(1.12); }
}

@keyframes aurora-drift-2 {
    from { transform: translate3d(0, 0, 0) scale(1.08); }
    to   { transform: translate3d(-7vw, -4vh, 0) scale(1); }
}

@keyframes aurora-drift-3 {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(4vw, -6vh, 0) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    .aurora__blob {
        animation: none;
    }
}

/* --- Hero --- */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding-top: calc(var(--nav-height) + clamp(1.5rem, 4vh, 3.5rem));
    padding-bottom: clamp(5rem, 12vh, 8rem);
    overflow: hidden;
    text-align: center;
}

.hero__inner {
    position: relative;
    z-index: var(--z-content);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Dekoracja: serca marki, lekko unoszące się i reagujące na scroll --- */
.hero__decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero__heart {
    position: absolute;
    width: clamp(70px, 9vw, 150px);
    height: auto;
    opacity: 0.4;
    filter: drop-shadow(0 18px 30px rgba(var(--dark-rgb), 0.12));
    will-change: transform;
}

.hero__heart--warm {
    top: 16%;
    left: 7%;
    animation: heart-float 14s var(--ease-in-out-soft) infinite alternate;
}

.hero__heart--cool {
    top: 26%;
    right: 8%;
    animation: heart-float 18s var(--ease-in-out-soft) 1.5s infinite alternate-reverse;
}

@keyframes heart-float {
    from { transform: translateY(0) rotate(-6deg); }
    to   { transform: translateY(-26px) rotate(7deg); }
}

@media (max-width: 720px) {
    .hero__heart--warm { top: 10%; left: -2%; opacity: 0.26; }
    .hero__heart--cool { top: 18%; right: -3%; opacity: 0.26; }
}

/* --- Logo hero --- */
.hero__logo-wrapper {
    position: relative;
    display: grid;
    place-items: center;
    margin-bottom: clamp(1rem, 3vh, 2.25rem);
    will-change: transform;
}

.hero__logo {
    position: relative;
    z-index: 1;
    width: clamp(104px, 11.5vw, 156px);
    height: auto;
    filter: drop-shadow(0 24px 45px rgba(var(--primary-rgb), 0.28));
    animation: logo-float 9s var(--ease-in-out-soft) infinite alternate;
}

.hero__logo-glow {
    position: absolute;
    inset: -18%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.85) 0%, rgba(var(--primary-rgb), 0.28) 42%, transparent 70%);
    filter: blur(28px);
    animation: logo-glow-pulse 7s var(--ease-in-out-soft) infinite alternate;
}

@keyframes logo-float {
    from { transform: translateY(0); }
    to   { transform: translateY(-14px); }
}

@keyframes logo-glow-pulse {
    from { opacity: 0.6; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__logo,
    .hero__logo-glow,
    .hero__heart {
        animation: none;
    }
}

/* --- Tytuł kinetyczny --- */
.hero__title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.1rem, 0.6vh, 0.5rem);
}

.hero__title-main {
    display: block;
    font-size: var(--step-7);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.045em;
}

/* Gradient marki na tekście.
   Litery są animowane transformem, a transform odcina je od tła klipowanego
   na rodzicu — dlatego każdy znak dostaje własny wycinek tego samego
   gradientu (background-size 800% + przesunięcie wg indeksu), co składa się
   w jedno ciągłe przejście przez całe słowo. */
.kinetic__char {
    display: inline-block;
    color: var(--primary-700);
    background-image: linear-gradient(120deg, var(--primary-700) 0%, var(--primary-color) 38%, var(--secondary-color) 100%);
    background-size: 800% 100%;
    background-position: calc(var(--i) * 100% / 7) 0;
    -webkit-background-clip: text;
    background-clip: text;
    /* Litery wjeżdżają kolejno — indeks --i steruje opóźnieniem */
    animation: char-in 900ms var(--ease-out-soft) both;
    animation-delay: calc(180ms + var(--i) * 55ms);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .kinetic__char {
        -webkit-text-fill-color: transparent;
    }
}

@keyframes char-in {
    from {
        opacity: 0;
        transform: translateY(0.4em) scale(0.92) rotate(3deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0);
    }
}

.hero__title-sub {
    display: block;
    font-size: clamp(1.05rem, 0.8rem + 1.1vw, 1.75rem);
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--secondary-700);
    animation: fade-up 800ms var(--ease-out-soft) 620ms both;
}

.hero__subtitle {
    max-width: 34ch;
    margin-top: clamp(1rem, 2.4vh, 1.75rem);
    font-size: var(--step-1);
    line-height: var(--leading-snug);
    color: var(--text-light);
    animation: fade-up 800ms var(--ease-out-soft) 760ms both;
}

.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: clamp(1.75rem, 4vh, 2.75rem);
    animation: fade-up 800ms var(--ease-out-soft) 900ms both;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .kinetic__char,
    .hero__title-sub,
    .hero__subtitle,
    .hero__buttons {
        animation: none;
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* Magnetyczny przycisk: przesunięcie liczone w JS, tu tylko wygładzenie */
[data-magnetic] {
    transform: translate(var(--mx, 0), var(--my, 0));
}

/* --- Ręce pod hero --- */
.hero__hands {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 0;
    width: min(560px, 76vw);
    transform: translateX(-50%);
    pointer-events: none;
}

/* Animacja i przygaszenie siedzą na obrazie, nie na kontenerze: kontener
   trzyma wyśrodkowanie translateX(-50%), które keyframe by nadpisał. */
.hero__hands img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(var(--dark-rgb), 0.12));
    animation: hands-in 1s var(--ease-out-soft) 1.05s both;
}

@keyframes hands-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 0.22; transform: translateY(0); }
}

/* --- Wskaźnik przewijania --- */
.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    z-index: var(--z-content);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    transform: translateX(-50%);
    color: var(--secondary-700);
    animation: scroll-hint-in 800ms var(--ease-out-soft) 1.2s both;
}

@keyframes scroll-hint-in {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

.scroll-indicator__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    opacity: 0.75;
}

.scroll-indicator__dot {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(var(--secondary-rgb), 0.35);
    border-radius: 50%;
    background: rgba(var(--white-rgb), 0.6);
    animation: scroll-bounce 2.4s var(--ease-in-out-soft) infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

.scroll-indicator:hover .scroll-indicator__dot {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
    .hero__hands img {
        animation: none;
        opacity: 0.22;
        transform: none;
    }

    .scroll-indicator {
        animation: none;
        opacity: 1;
        transform: translateX(-50%);
    }

    .scroll-indicator__dot {
        animation: none;
    }
}

/* Na niskich ekranach ręce i wskaźnik kolidują — chowamy wskaźnik */
@media (max-height: 640px) {
    .scroll-indicator {
        display: none;
    }
}
