/* TSC custom styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Nav shadow on scroll */
.nav-scrolled {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Hero 7-step circle animation */
.step-circle {
    translate: -50% -50%;
    opacity: 0;
    scale: 0.8;
    animation: stepAppear 0.5s ease-out forwards;
}

@keyframes stepAppear {
    to {
        opacity: 1;
        scale: 1;
    }
}

/* nth-child offset +2: child 1 = center logo, child 2 = arrow SVG */
.step-circle:nth-child(3)  { animation-delay: 0.2s; }
.step-circle:nth-child(4)  { animation-delay: 0.6s; }
.step-circle:nth-child(5)  { animation-delay: 1.0s; }
.step-circle:nth-child(6)  { animation-delay: 1.4s; }
.step-circle:nth-child(7)  { animation-delay: 1.8s; }
.step-circle:nth-child(8)  { animation-delay: 2.2s; }
.step-circle:nth-child(9)  { animation-delay: 2.6s; }

/* Arrow draw-in animation */
.step-arrow {
    fill: none;
    stroke: #8ebe21;
    stroke-width: 1.2;
    stroke-linecap: butt;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawArrow 0.4s ease-out forwards;
}

@keyframes drawArrow {
    to { stroke-dashoffset: 0; }
}

.step-arrow:nth-of-type(1) { animation-delay: 0.5s; }
.step-arrow:nth-of-type(2) { animation-delay: 0.9s; }
.step-arrow:nth-of-type(3) { animation-delay: 1.3s; }
.step-arrow:nth-of-type(4) { animation-delay: 1.7s; }
.step-arrow:nth-of-type(5) { animation-delay: 2.1s; }
.step-arrow:nth-of-type(6) { animation-delay: 2.5s; }

/* FAQ accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer.open {
    max-height: 500px;
}

.faq-chevron {
    transition: transform 0.3s ease;
}

.faq-chevron.open {
    transform: rotate(180deg);
}

/* Reference logo grid hover */
.reference-logo {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.reference-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e8e8e8;
    transform: translateX(-50%);
}

@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }
}

/* Contact form focus styles */
.form-input:focus {
    outline: none;
    border-color: #8ebe21;
    box-shadow: 0 0 0 3px rgba(142, 190, 33, 0.15);
}

/* TSC City hotspot animations */
.tsc-hotspot {
    cursor: pointer;
    transform-origin: center;
    transform-box: fill-box;
}

.tsc-hotspot-outer {
    fill: #8ebe21;
    opacity: 0.5;
    animation: tsc-pulse-1 3s ease-in-out infinite;
}

.tsc-hotspot:nth-of-type(even) .tsc-hotspot-outer {
    animation: tsc-pulse-2 4s ease-in-out infinite;
}

.tsc-hotspot-inner {
    fill: #ffffff;
    transition: fill 0.2s ease;
}

.tsc-hotspot:hover .tsc-hotspot-outer,
.tsc-hotspot.active .tsc-hotspot-outer {
    fill: #fcd200;
    opacity: 0.7;
    animation: none;
}

.tsc-hotspot:hover .tsc-hotspot-inner,
.tsc-hotspot.active .tsc-hotspot-inner {
    fill: #fcd200;
}

.tsc-hotspot:focus-visible {
    outline: 2px solid #008ad1;
    outline-offset: 4px;
    border-radius: 50%;
}

@keyframes tsc-pulse-1 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes tsc-pulse-2 {
    0%, 100% { transform: scale(1); }
    33% { transform: scale(0.85); }
    66% { transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    .tsc-hotspot-outer {
        animation: none !important;
    }
    .step-circle {
        animation: none !important;
        opacity: 1;
    }
    .step-arrow {
        animation: none !important;
        stroke-dashoffset: 0;
    }
}

/* Loading spinner for forms */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
