/**
 * SkillXarc — Animations & Micro-interactions
 * Version: 1.0.0
 *
 * Supplemental animation stylesheet.
 * Core transitions live in style.css; this file handles
 * more complex keyframe sequences and optional effects.
 */

/* ============================================================
   ANNOUNCEMENT BAR
   ============================================================ */
/* announcement-bar styles moved to style.css section 6 */

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* ============================================================
   CURSOR TRAIL (subtle green dot — decorative)
   ============================================================ */
.cursor-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    position: fixed;
    pointer-events: none;
    z-index: var(--z-top);
    transform: translate(-50%, -50%);
    transition: transform 0.05s linear, opacity 0.3s;
    opacity: 0;
    mix-blend-mode: multiply;
}
@media (hover: hover) {
    .cursor-dot { opacity: 0.5; }
}

/* ============================================================
   PAGE TRANSITION OVERLAY
   ============================================================ */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--color-night);
    z-index: var(--z-modal);
    transform: scaleY(0);
    transform-origin: bottom;
    pointer-events: none;
}
.page-transition.is-entering {
    animation: pageEnter 0.4s var(--ease-out) forwards;
}
.page-transition.is-leaving {
    animation: pageLeave 0.4s var(--ease-out) forwards;
}

@keyframes pageEnter {
    from { transform: scaleY(1); transform-origin: top; }
    to   { transform: scaleY(0); transform-origin: top; }
}
@keyframes pageLeave {
    from { transform: scaleY(0); transform-origin: bottom; }
    to   { transform: scaleY(1); transform-origin: bottom; }
}

/* ============================================================
   BUTTON LOADING STATE
   ============================================================ */
.btn--loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn--loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   CARD SHIMMER (placeholder loading)
   ============================================================ */
.shimmer {
    position: relative;
    overflow: hidden;
    background: var(--color-smoke);
}
.shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.6) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    to { transform: translateX(100%); }
}

/* ============================================================
   MOBILE NAV STAGGERED ITEMS
   ============================================================ */
.mobile-nav-overlay.is-open .mobile-nav__list li {
    opacity: 0;
    transform: translateX(20px);
    animation: mobileNavIn 0.4s var(--ease-out) forwards;
}
.mobile-nav-overlay.is-open .mobile-nav__list li:nth-child(1) { animation-delay: 0.08s; }
.mobile-nav-overlay.is-open .mobile-nav__list li:nth-child(2) { animation-delay: 0.13s; }
.mobile-nav-overlay.is-open .mobile-nav__list li:nth-child(3) { animation-delay: 0.18s; }
.mobile-nav-overlay.is-open .mobile-nav__list li:nth-child(4) { animation-delay: 0.23s; }
.mobile-nav-overlay.is-open .mobile-nav__list li:nth-child(5) { animation-delay: 0.28s; }
.mobile-nav-overlay.is-open .mobile-nav__list li:nth-child(6) { animation-delay: 0.33s; }

@keyframes mobileNavIn {
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   MOBILE NAV FOOTER
   ============================================================ */
.mobile-nav__footer {
    margin-top: auto;
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav__contact-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.45);
    transition: color var(--transition-fast);
}
.mobile-nav__contact-link svg { width: 16px; height: 16px; }
.mobile-nav__contact-link:hover { color: var(--color-white); }

/* ============================================================
   HOVER UNDERLINE EFFECT
   ============================================================ */
.hover-underline {
    position: relative;
    display: inline-block;
}
.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s var(--ease-out);
}
.hover-underline:hover::after { width: 100%; }

/* ============================================================
   GREEN GLOW BUTTON EFFECT
   ============================================================ */
.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(0,179,107,0.25) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.btn--primary { position: relative; overflow: hidden; }
.btn--primary:hover::before { opacity: 1; }

/* ============================================================
   SECTOR CHIP HOVER PULSE
   ============================================================ */
.sector-chip:hover .sector-chip__dot {
    animation: dotPulse 0.6s ease-in-out;
}

@keyframes dotPulse {
    0%   { transform: scale(1);   }
    40%  { transform: scale(1.6); }
    100% { transform: scale(1);   }
}

/* ============================================================
   APPROACH PROP NUMBER GLOW
   ============================================================ */
.approach-prop:hover .approach-prop__num {
    opacity: 1;
    text-shadow: 0 0 12px rgba(0,179,107,0.5);
}

/* ============================================================
   RESOURCE CARD ENTER
   ============================================================ */
.resource-card {
    transition:
        box-shadow   var(--transition-slow),
        transform    var(--transition-slow),
        border-color var(--transition-slow),
        opacity      0.3s ease;
}
.resource-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* ============================================================
   STAT NUMBER HIGHLIGHT
   ============================================================ */
.stat-item__number {
    position: relative;
    display: block;
}
.stat-item:hover .stat-item__number {
    text-shadow: 0 0 24px rgba(0,179,107,0.25);
}

/* ============================================================
   PREFERS-REDUCED-MOTION
   Honor system accessibility preference.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration:   0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration:  0.01ms !important;
        scroll-behavior:      auto   !important;
    }

    .marquee-track { animation: none; }
    .hero::before  { animation: none; }
}

/* ============================================================
   USING-MOUSE: suppress focus rings for mouse users
   ============================================================ */
body.using-mouse :focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================
   SERVICE BLOCK — NUMBER OVERLAY ANIMATION
   ============================================================ */
.service-block {
    position: relative;
    overflow: hidden;
}
.service-block::before {
    content: attr(data-service-num);
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: clamp(6rem, 10vw, 12rem);
    font-weight: 800;
    color: rgba(0,102,68,0.04);
    letter-spacing: -0.05em;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    transition: opacity var(--transition-slow);
}
.service-block:hover::before { opacity: 0; }

/* ============================================================
   FOOTER — Stagger reveal
   ============================================================ */
.footer-top .footer-brand,
.footer-top .footer-col {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.footer-top.revealed .footer-brand,
.footer-top.revealed .footer-col {
    opacity: 1;
    transform: none;
}
.footer-top.revealed .footer-col:nth-child(2) { transition-delay: 0.10s; }
.footer-top.revealed .footer-col:nth-child(3) { transition-delay: 0.20s; }
.footer-top.revealed .footer-col:nth-child(4) { transition-delay: 0.30s; }

/* ============================================================
   FORM FIELD FOCUS RING ANIMATION
   ============================================================ */
.form-control:focus {
    animation: focusRing 0.2s ease forwards;
}

@keyframes focusRing {
    from { box-shadow: 0 0 0 0px rgba(0,102,68,0.12); }
    to   { box-shadow: 0 0 0 3px rgba(0,102,68,0.12); }
}

/* ============================================================
   CTA BANNER — pulse accent line
   ============================================================ */
.cta-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.4) 50%,
        transparent
    );
    animation: bannerPulse 3s ease-in-out infinite;
}

@keyframes bannerPulse {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 1;   }
}

/* ============================================================
   HERO GRID DRIFT
   ============================================================ */
.hero::after {
    animation: gridDrift 20s linear infinite alternate;
}

@keyframes gridDrift {
    from { background-position: 0px 0px; }
    to   { background-position: 30px 30px; }
}
