/* ================================================
   ERSAHIN FLIESEN – Animations
   ================================================ */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scrollPulse {
    0%   { transform: scaleY(0) translateY(-50%); opacity: 0; transform-origin: top; }
    40%  { transform: scaleY(1) translateY(0);    opacity: 1; transform-origin: top; }
    80%  { transform: scaleY(1) translateY(0);    opacity: .4; transform-origin: bottom; }
    100% { transform: scaleY(0) translateY(50%);  opacity: 0; transform-origin: bottom; }
}

@keyframes tileGlow {
    0%, 100% { background: transparent; }
    50%      { background: rgba(142, 196, 216, 0.14); }
}

@keyframes counterIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lineGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* Hover underline animation for nav and footer links */
@keyframes linkUnderline {
    from { width: 0; }
    to   { width: 100%; }
}

/* Badge pulse on about section */
.about__badge {
    animation: badgePop 1s var(--ease-expo) 1.8s both;
}

@keyframes badgePop {
    0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
    70%  { transform: scale(1.08) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Service card shine on hover */
.service::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(142, 196, 216, 0.04) 50%,
        transparent 100%
    );
    transition: left .6s var(--ease-expo);
    pointer-events: none;
    z-index: 1;
}

.service:hover::before { left: 150%; }

/* Gallery overlay text slide up */
.gallery__overlay {
    padding-bottom: 20px;
    transition: opacity .35s ease, padding-bottom .35s var(--ease-expo);
}

.gallery__item:hover .gallery__overlay { padding-bottom: 28px; }

/* Process step hover lift */
.prozess__step {
    transition: transform .35s var(--ease-expo);
}

.prozess__step:hover { transform: translateY(-4px); }

/* Contact form field error shake */
@keyframes fieldShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.field.error input,
.field.error textarea {
    border-color: #c0392b;
    animation: fieldShake .4s ease;
}

/* Hero tile grid entrance */
.hero__tile {
    animation: tileFadeIn 1s var(--ease-expo) both;
}

/* FLIESEN – stroke draw animation */
.fl-letter {
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    animation: flDraw .4s ease-out both;
}

.fl-l0 { animation-delay: .90s; }
.fl-l1 { animation-delay: 1.00s; }
.fl-l2 { animation-delay: 1.10s; }
.fl-l3 { animation-delay: 1.20s; }
.fl-l4 { animation-delay: 1.30s; }
.fl-l5 { animation-delay: 1.40s; }
.fl-l6 { animation-delay: 1.50s; }

@keyframes flDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes tileFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
