/* ═══════════════════════════════════════════════════
   NESTOR ALONSO — Global Styles v2
   ═══════════════════════════════════════════════════ */

/* ── Material Symbols ── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ── Vignette Background ── */
.bg-vignette {
    background: radial-gradient(circle at 50% 50%, rgba(0, 221, 221, 0.08) 0%, rgba(13, 20, 26, 1) 100%);
}

/* ═══════════════════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════════════════ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* ── Reveal on Scroll ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }
.reveal-delay-5 { transition-delay: 400ms; }
.reveal-delay-6 { transition-delay: 480ms; }

/* ── Magnetic Buttons ── */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.magnetic:hover {
    filter: brightness(1.1);
}

/* ── Slide-in for messages ── */
@keyframes slide-in {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
.animate-slide-in {
    animation: slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ═══════════════════════════════════════════════════
   SCROLL TO TOP
   ═══════════════════════════════════════════════════ */
#scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════════════ */
.mobile-menu-panel {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-panel.hidden {
    opacity: 0;
    visibility: hidden;
}

.mobile-menu-panel.open {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════
   3D Timeline Wheel
   ═══════════════════════════════════════════════════ */
.stack-timeline-container {
    position: relative;
    height: 700px;
    overflow: hidden;
    margin: 60px 0;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    cursor: ns-resize;
    user-select: none;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .stack-timeline-container {
        height: 550px;
        margin: 30px 0;
    }
}

.stack-timeline-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.stack-timeline-item {
    position: absolute;
    width: 90%;
    max-width: 650px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
    will-change: transform, opacity, filter;
}

.stack-card {
    background: rgba(13, 20, 26, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 249, 249, 0.1);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    transition: inherit;
}

@media (max-width: 768px) {
    .stack-card {
        padding: 1.25rem;
        border-radius: 1rem;
    }
}

.stack-timeline-item.active {
    opacity: 1;
    z-index: 50;
}

.stack-timeline-item.active .stack-card {
    border-color: var(--primary);
    background: rgba(13, 148, 136, 0.1);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 
                0 0 20px rgba(13, 148, 136, 0.2);
}

.stack-timeline-item.expanded {
    z-index: 500 !important;
}

.stack-timeline-item.expanded .stack-card {
    background: rgba(15, 23, 42, 0.95);
    border-color: var(--primary);
    padding: 2rem;
}

.timeline-detail-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    opacity: 0;
}

.stack-timeline-item.expanded .timeline-detail-content {
    max-height: 350px;
    opacity: 1;
    margin-top: 16px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom internal scrollbar for cards */
.timeline-detail-content::-webkit-scrollbar {
    width: 4px;
}
.timeline-detail-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.timeline-detail-content::-webkit-scrollbar-thumb {
    background: rgba(13, 148, 136, 0.5); /* Tailwind teal-600 */
    border-radius: 4px;
}
.timeline-detail-content::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 148, 136, 0.8);
}

.stack-timeline-item.expanded .expand-hint {
    display: none;
}

/* ═══════════════════════════════════════════════════
   HERO: QA TOOLS FLOATING BUBBLES
   ═══════════════════════════════════════════════════ */
@keyframes float-up {
    0%   { transform: translateY(0px) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.8; }
    100% { transform: translateY(-80vh) rotate(5deg); opacity: 0; }
}

.qa-tool-bubble {
    position: absolute;
    pointer-events: none;
    animation: float-up linear infinite;
    white-space: nowrap;
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #0d9488;
    opacity: 0;
    padding: 4px 10px;
    border: 1px solid rgba(13, 148, 136, 0.25);
    border-radius: 100px;
    background: rgba(13, 148, 136, 0.05);
}

/* ═══════════════════════════════════════════════════
   WHATSAPP FLOATING BUTTON
   ═══════════════════════════════════════════════════ */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.3s ease;
    text-decoration: none;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.6);
}

/* Pulse ring */
.whatsapp-float::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.5);
    animation: wa-pulse 2s ease-out infinite;
}

@keyframes wa-pulse {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}


/* ═══════════════════════════════════════════════════
   ARSENAL: QA TOOLS MARQUEE STRIP
   ═══════════════════════════════════════════════════ */
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.marquee-track {
    display: flex;
    gap: 0;
    animation: marquee-scroll 28s linear infinite;
    width: max-content;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.3s ease;
    white-space: nowrap;
    cursor: default;
}

.marquee-item:hover {
    color: #0d9488;
}

.marquee-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0d9488;
    opacity: 0.4;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .font-headline {
        letter-spacing: -0.02em;
    }

    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hide decorative floating bubbles on mobile for performance */
    .qa-tool-bubble {
        display: none;
    }

    /* Arsenal bento: single col on mobile */
    .bento-grid-item {
        min-height: 180px;
    }
}

/* ═══════════════════════════════════════════════════
   PROSE OVERRIDES (for CKEditor content)
   ═══════════════════════════════════════════════════ */
.prose h2 { font-family: 'Epilogue', sans-serif; font-weight: 700; margin-top: 2rem; }
.prose h3 { font-family: 'Epilogue', sans-serif; font-weight: 700; margin-top: 1.5rem; }
.prose p { margin-bottom: 1rem; }
.prose a { color: #00dddd; text-decoration: underline; }
.prose a:hover { color: #00f9f9; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote {
    border-left: 4px solid #00f9f9;
    padding-left: 1rem;
    color: #b9cac9;
    font-style: italic;
}

/* ── Line Clamp ── */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Selection ── */
::selection {
    background-color: rgba(0, 249, 249, 0.3);
    color: #f4fffe;
}

/* ── Smooth Scroll ── */
html {
    scroll-behavior: smooth;
}

/* ── Links reset ── */
a.no-underline {
    text-decoration: none;
}
