/* Motion — presence, not noise */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 10px 28px rgba(15, 143, 110, 0.28); }
    50% { box-shadow: 0 14px 36px rgba(15, 143, 110, 0.42); }
}

body.loaded .hero-inner {
    animation: fadeUp 0.7s ease both;
}

.cta-button:not(.secondary) {
    animation: pulseGlow 3.5s ease-in-out infinite;
}

.floating-whatsapp {
    animation: floatSoft 3.2s ease-in-out infinite;
}

.service-card,
.portfolio-item,
.testimonial-card,
.info-item {
    will-change: transform;
}

.nav-links a {
    position: relative;
}

.nav-links a:not(.nav-cta)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.nav-links a:not(.nav-cta):hover::after {
    width: 100%;
}

/* Reveal helpers if AOS fails */
[data-aos] {
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 768px) {
    .cta-button:not(.secondary) {
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-button:not(.secondary),
    .floating-whatsapp,
    body.loaded .hero-inner {
        animation: none;
    }
}

/* —— Thank you popup —— */
.thank-you-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.thank-you-modal.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.thank-you-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 22, 16, 0.55);
    backdrop-filter: blur(8px);
    animation: thankYouFadeIn 0.4s ease both;
}

.thank-you-card {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.75rem 1.75rem;
    text-align: center;
    box-shadow: 0 28px 80px rgba(16, 32, 24, 0.22);
    overflow: hidden;
    transform: scale(0.88) translateY(24px);
    opacity: 0;
    animation: thankYouCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.thank-you-modal.is-visible .thank-you-card {
    animation: thankYouCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.thank-you-confetti span {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiPop 1.2s ease-out both;
}

.thank-you-confetti span:nth-child(1)  { top: 12%; left: 10%; background: #0f8f6e; animation-delay: 0.15s; }
.thank-you-confetti span:nth-child(2)  { top: 8%;  left: 28%; background: #14b8a6; animation-delay: 0.25s; }
.thank-you-confetti span:nth-child(3)  { top: 14%; left: 72%; background: #7fdcc0; animation-delay: 0.2s; }
.thank-you-confetti span:nth-child(4)  { top: 6%;  left: 88%; background: #0a6b53; animation-delay: 0.35s; }
.thank-you-confetti span:nth-child(5)  { top: 22%; left: 50%; background: #e8f0e4; animation-delay: 0.18s; }
.thank-you-confetti span:nth-child(6)  { top: 55%; left: 6%;  background: #14b8a6; animation-delay: 0.3s; }
.thank-you-confetti span:nth-child(7)  { top: 70%; left: 92%; background: #0f8f6e; animation-delay: 0.22s; }
.thank-you-confetti span:nth-child(8)  { top: 80%; left: 18%; background: #7fdcc0; animation-delay: 0.4s; }
.thank-you-confetti span:nth-child(9)  { top: 75%; left: 78%; background: #0a6b53; animation-delay: 0.28s; }
.thank-you-confetti span:nth-child(10) { top: 40%; left: 94%; background: #d8f3ea; animation-delay: 0.32s; }

.thank-you-icon-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
}

.thank-you-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent-soft, #d8f3ea);
    animation: thankYouPulse 1.8s ease-in-out infinite;
}

.thank-you-icon-wrap.error .thank-you-icon-ring {
    background: #fde8e6;
}

.thank-you-check {
    position: relative;
    width: 88px;
    height: 88px;
}

.thank-you-check-circle {
    stroke: var(--accent, #0f8f6e);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: thankYouCircleDraw 0.6s ease 0.2s forwards;
}

.thank-you-icon-wrap.error .thank-you-check-circle {
    stroke: var(--danger, #c44536);
}

.thank-you-check-path {
    stroke: var(--accent-deep, #0a6b53);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: thankYouCheckDraw 0.45s ease 0.65s forwards;
}

.thank-you-icon-wrap.error .thank-you-check-path {
    stroke: var(--danger, #c44536);
    d: path("M18 18l16 16M34 18L18 34");
}

.thank-you-modal h2 {
    font-family: var(--font-display, "Syne", sans-serif);
    font-size: 1.65rem;
    letter-spacing: -0.03em;
    color: var(--ink, #102018);
    margin-bottom: 0.5rem;
    animation: thankYouTextIn 0.5s ease 0.35s both;
}

.thank-you-message {
    color: var(--ink-soft, #3d5248);
    font-size: 1.02rem;
    line-height: 1.55;
    margin-bottom: 0.35rem;
    animation: thankYouTextIn 0.5s ease 0.45s both;
}

.thank-you-sub {
    color: var(--muted, #6b7f74);
    font-size: 0.9rem;
    margin-bottom: 1.35rem;
    animation: thankYouTextIn 0.5s ease 0.55s both;
}

.thank-you-close {
    width: 100%;
    animation: thankYouTextIn 0.5s ease 0.65s both;
}

@keyframes thankYouFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes thankYouCardIn {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes thankYouPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}

@keyframes thankYouCircleDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes thankYouCheckDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes thankYouTextIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes confettiPop {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(0deg) scale(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-12px) rotate(45deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(28px) rotate(180deg) scale(0.6);
    }
}

@media (prefers-reduced-motion: reduce) {
    .thank-you-card,
    .thank-you-backdrop,
    .thank-you-check-circle,
    .thank-you-check-path,
    .thank-you-modal h2,
    .thank-you-message,
    .thank-you-sub,
    .thank-you-close,
    .thank-you-confetti span,
    .thank-you-icon-ring {
        animation: none !important;
    }

    .thank-you-card {
        opacity: 1;
        transform: none;
    }

    .thank-you-check-circle,
    .thank-you-check-path {
        stroke-dashoffset: 0;
    }
}
